Maybe-bounds in associated type bounds don't get rejected #135229
Labels
C-bug
Category: This is a bug.
F-associated_type_bounds
`#![feature(associated_type_bounds)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code gets erroneously accepted:
Maybe-bounds / unbounds are only meant to be put on type parameters and associated types "declared in the immediate vicinity" which isn't the case here. This is supported by the fact that
Trait<Ty:>
(sic!) doesn't elaborate toTrait<Ty: Sized>
.Compare this to the snippet below which gets rightfully rejected:
Obviously a fix would be a breaking change. However I doubt anyone is writing such code (unless macro generated). In any case, we should run crater on the future PR.
The text was updated successfully, but these errors were encountered: