]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.full_tait.nll.stderr
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / type-alias-impl-trait / generic_type_does_not_live_long_enough.full_tait.nll.stderr
CommitLineData
48663c56 1error: at least one trait must be specified
6a06907d 2 --> $DIR/generic_type_does_not_live_long_enough.rs:12:24
48663c56 3 |
416331ca 4LL | type WrongGeneric<T> = impl 'static;
60c5eb7d 5 | ^^^^^^^^^^^^
48663c56 6
6a06907d
XL
7warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
8 --> $DIR/generic_type_does_not_live_long_enough.rs:3:32
9 |
10LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
11 | ^^^^^^^^^^^^^^^^^^^^^
12 |
13 = note: `#[warn(incomplete_features)]` on by default
14 = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
15
48663c56 16error[E0308]: mismatched types
6a06907d 17 --> $DIR/generic_type_does_not_live_long_enough.rs:9:18
48663c56
XL
18 |
19LL | let z: i32 = x;
60c5eb7d
XL
20 | --- ^ expected `i32`, found opaque type
21 | |
22 | expected due to this
dfeec247
XL
23...
24LL | type WrongGeneric<T> = impl 'static;
f035d41b 25 | ------------ the found opaque type
48663c56 26 |
60c5eb7d 27 = note: expected type `i32`
f035d41b 28 found opaque type `impl Sized`
48663c56 29
29967ef6 30error[E0310]: the parameter type `T` may not live long enough
6a06907d 31 --> $DIR/generic_type_does_not_live_long_enough.rs:17:30
29967ef6
XL
32 |
33LL | fn wrong_generic<T>(t: T) -> WrongGeneric<T> {
34 | ^^^^^^^^^^^^^^^
35 |
36 = help: consider adding an explicit lifetime bound `T: 'static`...
37
38error[E0310]: the parameter type `T` may not live long enough
6a06907d 39 --> $DIR/generic_type_does_not_live_long_enough.rs:12:24
29967ef6
XL
40 |
41LL | type WrongGeneric<T> = impl 'static;
42 | ^^^^^^^^^^^^
43 |
44 = help: consider adding an explicit lifetime bound `T: 'static`...
45 = note: ...so that the type `T` will meet its required lifetime bounds
46
6a06907d 47error: aborting due to 4 previous errors; 1 warning emitted
48663c56 48
29967ef6
XL
49Some errors have detailed explanations: E0308, E0310.
50For more information about an error, try `rustc --explain E0308`.