2019-11-04 00:00:00 +00:00
|
|
|
// check-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(dead_code)]
|
2018-08-31 15:02:01 +02:00
|
|
|
#![allow(stable_features)]
|
2018-01-11 11:57:56 +09:00
|
|
|
#![feature(associated_consts)]
|
|
|
|
|
|
|
|
impl A for i32 {
|
|
|
|
type Foo = u32;
|
|
|
|
}
|
|
|
|
impl B for u32 {
|
|
|
|
const BAR: i32 = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
trait A {
|
|
|
|
type Foo: B;
|
|
|
|
}
|
|
|
|
|
|
|
|
trait B {
|
|
|
|
const BAR: i32;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn generic<T: A>() {
|
|
|
|
// This panics if the universal function call syntax is used as well
|
|
|
|
println!("{}", T::Foo::BAR);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|