2017-02-22 23:59:40 +03:00
|
|
|
// A few contrived examples where lifetime should (or should not) be parsed as an object type.
|
|
|
|
// Lifetimes parsed as types are still rejected later by semantic checks.
|
|
|
|
|
|
|
|
// `'static` is a lifetime, `'static +` is a type, `'a` is a type
|
|
|
|
fn g() where
|
|
|
|
'static: 'static,
|
2019-05-28 14:46:13 -04:00
|
|
|
dyn 'static +: 'static + Copy,
|
2019-06-22 00:12:28 +08:00
|
|
|
//~^ ERROR at least one trait is required for an object type
|
2017-02-22 23:59:40 +03:00
|
|
|
{}
|
|
|
|
|
|
|
|
fn main() {}
|