Skip to content

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

Closed

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)

Activity

  1. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Sep 10, 2025
  2. added
    A-diagnosticsArea: Messages for errors, warnings, and lints
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    D-papercutDiagnostics: An error or lint that needs small tweaks.
    on Sep 10, 2025
  3. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Sep 11, 2025
  4. added a commit that references this issue on Sep 16, 2025
  5. added a commit that references this issue on Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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