]> git.proxmox.com Git - rustc.git/blob - src/test/ui/generic-associated-types/projection-type-lifetime-mismatch.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / generic-associated-types / projection-type-lifetime-mismatch.stderr
1 error: lifetime may not live long enough
2 --> $DIR/projection-type-lifetime-mismatch.rs:17:5
3 |
4 LL | fn f(x: &impl for<'a> X<Y<'a> = &'a ()>) -> &'static () {
5 | - let's call the lifetime of this reference `'1`
6 LL | x.m()
7 | ^^^^^ returning this value requires that `'1` must outlive `'static`
8
9 error: lifetime may not live long enough
10 --> $DIR/projection-type-lifetime-mismatch.rs:22:5
11 |
12 LL | fn g<T: for<'a> X<Y<'a> = &'a ()>>(x: &T) -> &'static () {
13 | - let's call the lifetime of this reference `'1`
14 LL | x.m()
15 | ^^^^^ returning this value requires that `'1` must outlive `'static`
16
17 error: lifetime may not live long enough
18 --> $DIR/projection-type-lifetime-mismatch.rs:27:5
19 |
20 LL | fn h(x: &()) -> &'static () {
21 | - let's call the lifetime of this reference `'1`
22 LL | x.m()
23 | ^^^^^ returning this value requires that `'1` must outlive `'static`
24
25 error: aborting due to 3 previous errors
26