]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/object/vs-lifetime-2.rs
Merge commit 'c4416f20dcaec5d93077f72470e83e150fb923b1' into sync-rustfmt
[rust.git] / src / test / ui / traits / object / vs-lifetime-2.rs
1 // A few contrived examples where lifetime should (or should not) be parsed as an object type.
2 // Lifetimes parsed as types are still rejected later by semantic checks.
3
4 // `'static` is a lifetime, `'static +` is a type, `'a` is a type
5 fn g() where
6     'static: 'static,
7     dyn 'static +: 'static + Copy,
8     //~^ ERROR at least one trait is required for an object type
9 {}
10
11 fn main() {}