]>
Commit | Line | Data |
---|---|---|
0731742a | 1 | trait Trait<'a> {} |
223e47cc | 2 | |
ba9703b0 XL |
3 | trait Obj {} |
4 | ||
cc61c64b XL |
5 | fn f<T: (Copy) + (?Sized) + (for<'a> Trait<'a>)>() {} |
6 | ||
7 | fn main() { | |
ba9703b0 XL |
8 | let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>; |
9 | //~^ ERROR `?Trait` is not permitted in trait object types | |
10 | //~| ERROR only auto traits can be used as additional traits | |
11 | //~| WARN trait objects without an explicit `dyn` are deprecated | |
136023e0 | 12 | //~| WARN this is accepted in the current edition |
17df50a5 | 13 | let _: Box<?Sized + (for<'a> Trait<'a>) + (Obj)>; |
0731742a | 14 | //~^ ERROR `?Trait` is not permitted in trait object types |
ba9703b0 | 15 | //~| ERROR only auto traits can be used as additional traits |
dc9dc135 | 16 | //~| WARN trait objects without an explicit `dyn` are deprecated |
136023e0 | 17 | //~| WARN this is accepted in the current edition |
17df50a5 | 18 | let _: Box<for<'a> Trait<'a> + (Obj) + (?Sized)>; |
ba9703b0 XL |
19 | //~^ ERROR `?Trait` is not permitted in trait object types |
20 | //~| ERROR only auto traits can be used as additional traits | |
dc9dc135 | 21 | //~| WARN trait objects without an explicit `dyn` are deprecated |
136023e0 | 22 | //~| WARN this is accepted in the current edition |
cc61c64b | 23 | } |