Skip to content

Erroneously returning E0404 instead of E0245 #36337

Closed
@mark-i-m

Description

@mark-i-m

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

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions