rust/tests/ui/underscore-lifetime/dyn-trait-underscore-in-struct.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
248 B
Rust
Raw Normal View History

// 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
}
2022-06-05 11:33:09 -05:00
fn main() {}