]> git.lizzy.rs Git - rust.git/blob - src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / underscore-lifetime / dyn-trait-underscore-in-struct.rs
1 // Check that the `'_` in `dyn Trait + '_` acts like ordinary elision,
2 // and not like an object lifetime default.
3 //
4 // cc #48468
5
6 use std::fmt::Debug;
7
8 struct Foo {
9     x: Box<dyn Debug + '_>, //~ ERROR missing lifetime specifier
10     //~^ ERROR E0228
11 }
12
13 fn main() { }