2019-01-06 09:33:05 -06:00
|
|
|
trait Trait<'a> {}
|
2017-04-04 17:12:53 -05:00
|
|
|
|
|
|
|
fn f<T: (Copy) + (?Sized) + (for<'a> Trait<'a>)>() {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _: Box<(Copy) + (?Sized) + (for<'a> Trait<'a>)>;
|
2019-05-19 16:26:42 -05:00
|
|
|
//~^ ERROR `?Trait` is not permitted in trait object types
|
2019-05-28 13:45:27 -05:00
|
|
|
//~| WARN trait objects without an explicit `dyn` are deprecated
|
2017-04-04 17:12:53 -05:00
|
|
|
let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Copy)>;
|
2019-05-28 13:45:27 -05:00
|
|
|
//~^ WARN trait objects without an explicit `dyn` are deprecated
|
2017-04-04 17:12:53 -05:00
|
|
|
let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
|
2019-03-30 17:06:09 -05:00
|
|
|
//~^ ERROR use of undeclared lifetime name `'a`
|
2019-05-19 16:26:42 -05:00
|
|
|
//~| ERROR `?Trait` is not permitted in trait object types
|
2019-05-28 13:45:27 -05:00
|
|
|
//~| WARN trait objects without an explicit `dyn` are deprecated
|
2017-04-04 17:12:53 -05:00
|
|
|
}
|