-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
I was working on #32777 and trying to generate E0245. I came up with the following example:
struct Foo(u8);
fn foo<T>(t: T)
where T: Foo {
}
I believe this should return E0245, as Foo
is not a trait, so it cannot be used as a bound. However, the compiler gives error E404, which states that Foo
is not a trait, so it cannot be implemented for a type (according to https://doc.rust-lang.org/error-index.html#E0404).
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.