Closed
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
Area: Non-lexical lifetimes (NLL)Area: Trait systemWorking towards the "invalid code does not compile" goalMedium priorityStatus: Blocked on something else such as an RFC or other implementation work.Status: Being actively tracked by the types teamRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.