Confusing error when using Self in generic impl block missing trait bounds #52523
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This gives me the following error:
If I change
Self::default()
toFoo::default()
, I get the following error, which is much more straightforward:Both can be fixed by adding a trait bound to the
impl
block (impl<T: Default> Foo<T> {...}
).The text was updated successfully, but these errors were encountered: