]> git.proxmox.com Git - rustc.git/blame - src/test/ui/traits/trait-upcasting/type-checking-test-3.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / traits / trait-upcasting / type-checking-test-3.stderr
CommitLineData
923072b8
FG
1error: lifetime may not live long enough
2 --> $DIR/type-checking-test-3.rs:12:13
94222f64
XL
3 |
4LL | fn test_wrong1<'a>(x: &dyn Foo<'static>, y: &'a u32) {
923072b8
FG
5 | -- lifetime `'a` defined here
6LL | let _ = x as &dyn Bar<'a>; // Error
7 | ^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
94222f64 8
923072b8
FG
9error: lifetime may not live long enough
10 --> $DIR/type-checking-test-3.rs:17:13
94222f64
XL
11 |
12LL | fn test_wrong2<'a>(x: &dyn Foo<'a>) {
923072b8
FG
13 | -- lifetime `'a` defined here
14LL | let _ = x as &dyn Bar<'static>; // Error
15 | ^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
94222f64
XL
16
17error: aborting due to 2 previous errors
18