-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)A-borrow-checkerArea: The borrow checkerArea: The borrow checkerC-bugCategory: This is a bug.Category: This is a bug.NLL-soundWorking towards the "invalid code does not compile" goalWorking towards the "invalid code does not compile" goalT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
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
Metadata
Metadata
Assignees
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)A-borrow-checkerArea: The borrow checkerArea: The borrow checkerC-bugCategory: This is a bug.Category: This is a bug.NLL-soundWorking towards the "invalid code does not compile" goalWorking towards the "invalid code does not compile" goalT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.