Files
rust/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.rs
Mark Rousskov 2a663555dd Remove licenses
2018-12-25 21:08:33 -07:00

14 lines
270 B
Rust

// Check that the `'_` in `dyn Trait + '_` acts like ordinary elision,
// and not like an object lifetime default.
//
// cc #48468
use std::fmt::Debug;
struct Foo {
x: Box<dyn Debug + '_>, //~ ERROR missing lifetime specifier
//~^ ERROR E0228
}
fn main() { }