rustc/tests/ui/error-codes/E0227.rs
2024-06-19 10:24:51 +02:00

12 lines
251 B
Rust

trait Foo<'foo>: 'foo {}
trait Bar<'bar>: 'bar {}
trait FooBar<'foo, 'bar>: Foo<'foo> + Bar<'bar> {}
struct Baz<'foo, 'bar> {
baz: dyn FooBar<'foo, 'bar>,
//~^ ERROR ambiguous lifetime bound, explicit lifetime bound required
}
fn main() {}