rust/tests/ui/variance/variance-associated-types2....

11 lines
365 B
Plaintext

error: lifetime may not live long enough
--> $DIR/variance-associated-types2.rs:13:12
|
LL | fn take<'a>(_: &'a u32) {
| -- lifetime `'a` defined here
LL | let _: Box<dyn Foo<Bar = &'a u32>> = make();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
error: aborting due to 1 previous error