unnormalized user annotations can be ill-formed · Issue #104764 · rust-lang/rust (original) (raw)

We're still not doing WF-checks on user annotations prior to normalization, so this code is still accepted:

trait Trait { type Ty; } impl Trait for T { type Ty = (); } fn test() { let _: <&'static T as Trait>::Ty = (); }

I consider this a different issue than #101350 because it is a more long-standing problem and not strictly an NLL regression.

Originally posted by @aliemjay in #101947 (comment)

@rustbot label C-bug T-types A-borrow-checker A-NLL NLL-sound
@rustbot claim