1 error: lifetime may not live long enough
2 --> $DIR/type-checking-test-3.rs:11:13
4 LL | fn test_wrong1<'a>(x: &dyn Foo<'static>, y: &'a u32) {
5 | -- lifetime `'a` defined here
6 LL | let _ = x as &dyn Bar<'a>; // Error
7 | ^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
9 error: lifetime may not live long enough
10 --> $DIR/type-checking-test-3.rs:16:13
12 LL | fn test_wrong2<'a>(x: &dyn Foo<'a>) {
13 | -- lifetime `'a` defined here
14 LL | let _ = x as &dyn Bar<'static>; // Error
15 | ^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
17 error: aborting due to 2 previous errors