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