add def-ids from nominal types into TraitSelect

This way we distinguish, in particular, `Foo: Sized`
and `Bar: Sized`, which fixes #33850.
This commit is contained in:
Niko Matsakis 2016-05-27 21:19:11 -04:00
parent 63bb0847bd
commit 4038b5b3ee
6 changed files with 27 additions and 6 deletions

View file

@ -40,7 +40,7 @@ pub fn use_EmbedX(embed: EmbedX) -> u32 {
embed.x.x as u32
}
#[rustc_dirty(label="TypeckItemBody", cfg="rpass2")] // FIXME(#33850) should be clean
#[rustc_clean(label="TypeckItemBody", cfg="rpass2")]
pub fn use_Y() {
let x: Y = Y { y: 'c' };
}

View file

@ -47,7 +47,7 @@ pub fn use_EmbedX(embed: EmbedX) -> u32 {
//[cfail2]~^ ERROR attempted access of field `x`
}
#[rustc_dirty(label="TypeckItemBody", cfg="cfail2")] // FIXME(#33850) should be clean
#[rustc_clean(label="TypeckItemBody", cfg="cfail2")]
pub fn use_Y() {
let x: Y = Y { y: 'c' };
}

View file

@ -45,7 +45,7 @@ pub fn use_EmbedX(x: EmbedX) -> u32 {
x.x as u32
}
#[rustc_dirty(label="TypeckItemBody", cfg="rpass2")] // FIXME(#33850) should be clean
#[rustc_clean(label="TypeckItemBody", cfg="rpass2")]
pub fn use_Y() {
let x: Y = Y { y: 'c' };
}

View file

@ -28,7 +28,7 @@ pub fn use_EmbedX(embed: EmbedX) -> u32 {
embed.x.x as u32
}
#[rustc_dirty(label="TypeckItemBody", cfg="rpass2")] // FIXME(#33850) should be clean
#[rustc_clean(label="TypeckItemBody", cfg="rpass2")]
pub fn use_Y() {
let x: Y = Y { y: 'c' };
}

View file

@ -44,7 +44,7 @@ pub fn use_EmbedX(embed: EmbedX) -> u32 {
embed.x.x as u32
}
#[rustc_dirty(label="TypeckItemBody", cfg="rpass2")] // FIXME(#33850) should be clean
#[rustc_clean(label="TypeckItemBody", cfg="rpass2")]
pub fn use_Y() {
let x: Y = Y { y: 'c' };
}