]> git.proxmox.com Git - rustc.git/blob - src/test/ui/generic-associated-types/issue-91139.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / generic-associated-types / issue-91139.stderr
1 error: `T` does not live long enough
2 --> $DIR/issue-91139.rs:14:12
3 |
4 LL | let _: for<'a> fn(<() as Foo<T>>::Type<'a>, &'a T) = |_, _| ();
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
7 error: `T` does not live long enough
8 --> $DIR/issue-91139.rs:14:12
9 |
10 LL | let _: for<'a> fn(<() as Foo<T>>::Type<'a>, &'a T) = |_, _| ();
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12
13 error: `T` does not live long enough
14 --> $DIR/issue-91139.rs:14:12
15 |
16 LL | let _: for<'a> fn(<() as Foo<T>>::Type<'a>, &'a T) = |_, _| ();
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18
19 error: `T` does not live long enough
20 --> $DIR/issue-91139.rs:14:12
21 |
22 LL | let _: for<'a> fn(<() as Foo<T>>::Type<'a>, &'a T) = |_, _| ();
23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24
25 error: `T` does not live long enough
26 --> $DIR/issue-91139.rs:14:58
27 |
28 LL | let _: for<'a> fn(<() as Foo<T>>::Type<'a>, &'a T) = |_, _| ();
29 | ^^^^^^^^^
30
31 error: `T` does not live long enough
32 --> $DIR/issue-91139.rs:14:58
33 |
34 LL | let _: for<'a> fn(<() as Foo<T>>::Type<'a>, &'a T) = |_, _| ();
35 | ^^^^^^^^^
36
37 error[E0310]: the parameter type `T` may not live long enough
38 --> $DIR/issue-91139.rs:14:58
39 |
40 LL | let _: for<'a> fn(<() as Foo<T>>::Type<'a>, &'a T) = |_, _| ();
41 | ^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
42 |
43 help: consider adding an explicit lifetime bound...
44 |
45 LL | fn foo<T: 'static>() {
46 | +++++++++
47
48 error: `T` does not live long enough
49 --> $DIR/issue-91139.rs:14:58
50 |
51 LL | let _: for<'a> fn(<() as Foo<T>>::Type<'a>, &'a T) = |_, _| ();
52 | ^^^^^^^^^
53
54 error: `T` does not live long enough
55 --> $DIR/issue-91139.rs:14:58
56 |
57 LL | let _: for<'a> fn(<() as Foo<T>>::Type<'a>, &'a T) = |_, _| ();
58 | ^^^^^^^^^
59
60 error: aborting due to 9 previous errors
61
62 For more information about this error, try `rustc --explain E0310`.