mirror of https://github.com/rust-lang/rust
32 lines
1.3 KiB
Plaintext
32 lines
1.3 KiB
Plaintext
error[E0310]: the parameter type `A` may not live long enough
|
|
--> $DIR/implied_lifetime_wf_check4_static.rs:4:18
|
|
|
|
|
LL | type Ty<A> = impl Sized + 'static;
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| the parameter type `A` must be valid for the static lifetime...
|
|
| ...so that the type `A` will meet its required lifetime bounds
|
|
|
|
|
help: consider adding an explicit lifetime bound
|
|
|
|
|
LL | type Ty<A: 'static> = impl Sized + 'static;
|
|
| +++++++++
|
|
|
|
error[E0310]: the parameter type `A` may not live long enough
|
|
--> $DIR/implied_lifetime_wf_check4_static.rs:8:41
|
|
|
|
|
LL | fn test<A>() where Ty<A>: 'static { assert_static::<A>() }
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| the parameter type `A` must be valid for the static lifetime...
|
|
| ...so that the type `A` will meet its required lifetime bounds
|
|
|
|
|
help: consider adding an explicit lifetime bound
|
|
|
|
|
LL | fn test<A: 'static>() where Ty<A>: 'static { assert_static::<A>() }
|
|
| +++++++++
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0310`.
|