blob: 52cdd6493b06dc29f1c016b76f45435a6b5cd6b8 [file] [log] [blame]
error[E0308]: mismatched types
--> $DIR/variance-associated-types2.rs:13:42
|
LL | let _: Box<dyn Foo<Bar = &'a u32>> = make();
| ^^^^^^ lifetime mismatch
|
= note: expected trait object `dyn Foo<Bar = &'a u32>`
found trait object `dyn Foo<Bar = &'static u32>`
note: the lifetime `'a` as defined on the function body at 12:9...
--> $DIR/variance-associated-types2.rs:12:9
|
LL | fn take<'a>(_: &'a u32) {
| ^^
= note: ...does not necessarily outlive the static lifetime
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.