mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
20 lines
329 B
Rust
20 lines
329 B
Rust
// Test for issue #23969
|
|
|
|
|
|
trait Foo {
|
|
type Ty;
|
|
const BAR: u32;
|
|
}
|
|
|
|
impl Foo for () {
|
|
type Ty = ();
|
|
type Ty = usize; //~ ERROR duplicate definitions
|
|
const BAR: u32 = 7;
|
|
const BAR: u32 = 8; //~ ERROR duplicate definitions
|
|
}
|
|
|
|
fn main() {
|
|
let _: <() as Foo>::Ty = ();
|
|
let _: u32 = <() as Foo>::BAR;
|
|
}
|