rust_2021_prelude_collisions bad suggestion with lifetime generics #88470
Labels
A-edition-2021
Area: The 2021 edition
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-bug
Category: This is a bug.
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
I tried this code:
This generates a suggestion to avoid the prelude collision with:
However, that does not compile because the generics for
PyTryFrom
is a lifetime parameter which should not be specified with_
. I believe the correct suggestion would be<U as PyTryFrom>::try_from(self)
without the generic args.Found in the 2021 crater run for:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: