]>
Commit | Line | Data |
---|---|---|
6a06907d XL |
1 | #![feature(associated_type_defaults)] |
2 | ||
3 | trait Assoc { | |
4 | fn func() {} | |
5 | const CONST: u8 = 0; | |
6 | type Ty = u8; | |
7 | } | |
8 | ||
9 | trait Dyn {} | |
10 | ||
11 | impl Assoc for dyn Dyn {} | |
12 | ||
13 | fn main() { | |
17df50a5 XL |
14 | Dyn::func(); |
15 | //~^ WARN trait objects without an explicit `dyn` are deprecated | |
16 | //~| WARN this was previously accepted by the compiler | |
17 | ::Dyn::func(); | |
18 | //~^ WARN trait objects without an explicit `dyn` are deprecated | |
19 | //~| WARN this was previously accepted by the compiler | |
20 | Dyn::CONST; | |
21 | //~^ WARN trait objects without an explicit `dyn` are deprecated | |
22 | //~| WARN this was previously accepted by the compiler | |
6a06907d XL |
23 | let _: Dyn::Ty; //~ ERROR ambiguous associated type |
24 | } |