]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/object/vs-lifetime-2.rs
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / 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() {}