Skip to content

E0122 says bounds aren't enforced, but they actually are? #40640

Open
@clarfonthey

Description

@clarfonthey

For multistr I've included trait bounds in type aliases so that it's clear in the documentation what should be passed to the generics for these aliases, e.g. SliceArray5.

But because I've generated several of these aliases E0122 floods my error output and I don't see any way of turning it off:

warning[E0122]: trait bounds are not (yet) enforced in type definitions
   --> src/array.rs:166:13
    |
166 |             pub type $slice_name<T: 'static + Copy> = $name<[T]>;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...

(× 17)

It'd be really nice if I could silence this error somehow, because while it's good to have the error by default, it's making debugging my code very hard when I have to scroll past a wall of these errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.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