A custom error message for lending iterators
This commit is contained in:
parent
464987730a
commit
d6e4fe569c
5 changed files with 74 additions and 5 deletions
|
@ -234,6 +234,10 @@ resolve_items_in_traits_are_not_importable =
|
|||
resolve_label_with_similar_name_reachable =
|
||||
a label with a similar name is reachable
|
||||
|
||||
resolve_lending_iterator_report_error =
|
||||
associated type `Iterator::Item` is declared without lifetime parameters, so using a borrowed type for them requires that lifetime to come from the implemented type.
|
||||
.note = you can't create an `Iterator` that borrows each `Item` from itself, but you can instead create a new type that borrows your existing type and implement `Iterator` for that new type.
|
||||
|
||||
resolve_lifetime_param_in_enum_discriminant =
|
||||
lifetime parameters may not be used in enum discriminant values
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue