]> git.proxmox.com Git - rustc.git/blob - src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.nll.stderr
New upstream version 1.61.0+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / generic_type_does_not_live_long_enough.nll.stderr
1 error: at least one trait must be specified
2 --> $DIR/generic_type_does_not_live_long_enough.rs:10:24
3 |
4 LL | type WrongGeneric<T> = impl 'static;
5 | ^^^^^^^^^^^^
6
7 error: non-defining opaque type use in defining scope
8 --> $DIR/generic_type_does_not_live_long_enough.rs:6:18
9 |
10 LL | let z: i32 = x;
11 | ^
12 |
13 note: used non-generic type `&'static i32` for generic parameter
14 --> $DIR/generic_type_does_not_live_long_enough.rs:10:19
15 |
16 LL | type WrongGeneric<T> = impl 'static;
17 | ^
18
19 error[E0310]: the parameter type `T` may not live long enough
20 --> $DIR/generic_type_does_not_live_long_enough.rs:14:5
21 |
22 LL | t
23 | ^
24 |
25 = help: consider adding an explicit lifetime bound `T: 'static`...
26
27 error: aborting due to 3 previous errors
28
29 For more information about this error, try `rustc --explain E0310`.