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:
parent
63bb0847bd
commit
4038b5b3ee
6 changed files with 27 additions and 6 deletions
|
|
@ -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' };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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' };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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' };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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' };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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' };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue