Skip to content

"not all trait items implemented" error doesn't print const params #146404

@lcnr

Description

@lcnr
  • Type parameters are the only kind of generic parameters. You can't have const N: usize as the self type of a trait bound, so it never winds up in types so we'll never wind up putting const generics in the final generics string. playground (run test)
  • Type parameters are always used in the self type of a trait bound. This was not true on stable until very recently when we made T: ?Sized be sugar for T: MetaSized. You can still observe this with the rustc_no_implicit_bounds attr: playground (run test). Also this means that right now T: ?Sized on stable gets re-sugared as T: MetaSized which is wrong

Originally posted by @BoxyUwU in #145929 (review)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsD-papercutDiagnostics: An error or lint that needs small tweaks.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions