Skip to content

user type annotations are captured post normalization #54940

Closed
@nikomatsakis

Description

@nikomatsakis

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)A-trait-systemArea: Trait systemNLL-soundWorking towards the "invalid code does not compile" goalP-mediumMedium priorityS-blockedStatus: Blocked on something else such as an RFC or other implementation work.S-types-trackedStatus: Being actively tracked by the types teamT-compilerRelevant 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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions