Closed
Description
We're still not doing WF-checks on user annotations prior to normalization, so this code is still accepted:
trait Trait { type Ty; }
impl<T> Trait for T { type Ty = (); }
fn test<T>() {
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