2015-06-03 00:47:41 -05:00
|
|
|
// Test for issue #23969
|
|
|
|
|
|
|
|
|
|
|
|
trait Foo {
|
|
|
|
type Ty;
|
|
|
|
const BAR: u32;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Foo for () {
|
|
|
|
type Ty = ();
|
2016-03-09 10:57:53 -06:00
|
|
|
type Ty = usize; //~ ERROR duplicate definitions
|
2015-06-03 00:47:41 -05:00
|
|
|
const BAR: u32 = 7;
|
2016-03-09 10:57:53 -06:00
|
|
|
const BAR: u32 = 8; //~ ERROR duplicate definitions
|
2015-06-03 00:47:41 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _: <() as Foo>::Ty = ();
|
|
|
|
let _: u32 = <() as Foo>::BAR;
|
|
|
|
}
|