-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix max_encoded_len for Compact fields (#508)
* Fix max_encoded_len for Compact fields * fix * Add missing test * nit * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> * fix ui-test output --------- Co-authored-by: Bastian Köcher <[email protected]>
- Loading branch information
Showing
3 changed files
with
65 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
error[E0599]: no function or associated item named `max_encoded_len` found for struct `NotMel` in the current scope | ||
error[E0277]: the trait bound `NotMel: MaxEncodedLen` is not satisfied | ||
--> tests/max_encoded_len_ui/unsupported_variant.rs:8:9 | ||
| | ||
4 | struct NotMel; | ||
| ------------- function or associated item `max_encoded_len` not found for this struct | ||
... | ||
8 | NotMel(NotMel), | ||
| ^^^^^^ function or associated item not found in `NotMel` | ||
| ^^^^^^ the trait `MaxEncodedLen` is not implemented for `NotMel` | ||
| | ||
= help: items from traits can only be used if the trait is implemented and in scope | ||
= note: the following trait defines an item `max_encoded_len`, perhaps you need to implement it: | ||
candidate #1: `MaxEncodedLen` | ||
= help: the following other types implement trait `MaxEncodedLen`: | ||
() | ||
(TupleElement0, TupleElement1) | ||
(TupleElement0, TupleElement1, TupleElement2) | ||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3) | ||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4) | ||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5) | ||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6) | ||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7) | ||
and $N others |