-
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-trait-systemArea: Trait systemArea: Trait systemNLL-soundWorking towards the "invalid code does not compile" goalWorking towards the "invalid code does not compile" goalP-mediumMedium priorityMedium priorityS-blockedStatus: Blocked on something else such as an RFC or other implementation work.Status: Blocked on something else such as an RFC or other implementation work.S-types-trackedStatus: Being actively tracked by the types teamStatus: Being actively tracked by the types teamT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-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
This example compiles but should not. Haven't investigated deeply.
#![feature(nll)]
trait Foo {
type Item;
}
impl<'a, u32> Foo for &'a u32 {
type Item = &'a i32;
}
fn main() {
let a = 22_i32;
let x: <&'static u32 as Foo>::Item = &a;
}
cc #47184
Metadata
Metadata
Assignees
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)A-trait-systemArea: Trait systemArea: Trait systemNLL-soundWorking towards the "invalid code does not compile" goalWorking towards the "invalid code does not compile" goalP-mediumMedium priorityMedium priorityS-blockedStatus: Blocked on something else such as an RFC or other implementation work.Status: Blocked on something else such as an RFC or other implementation work.S-types-trackedStatus: Being actively tracked by the types teamStatus: Being actively tracked by the types teamT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-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.