This repository was archived by the owner on May 23, 2024. It is now read-only.
Commit e7cd7a8
committed
ices/97946.rs: fixed with errors
=== stdout ===
=== stderr ===
error[E0401]: can't use generic parameters from outer function
--> /home/runner/work/glacier/glacier/ices/97946.rs:7:34
|
5 | impl <T> A<T> {
| - type parameter from outer function
6 | thread_local! {
7 | static MY_STATIC: Option<T> = None;
| ^ use of generic parameter from outer function
|
= help: try using a local generic parameter instead
error[E0310]: the parameter type `T` may not live long enough
--> /home/runner/work/glacier/glacier/ices/97946.rs:6:5
|
6 | / thread_local! {
7 | | static MY_STATIC: Option<T> = None;
8 | | }
| |_____^ ...so that the type `Option<T>` will meet its required lifetime bounds...
|
note: ...that is required by this bound
= note: this error originates in the macro `$crate::__thread_local_inner` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider adding an explicit lifetime bound...
|
5 | impl <T: 'static> A<T> {
| +++++++++
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0310, E0401.
For more information about an error, try `rustc --explain E0310`.
==============1 parent 29a2588 commit e7cd7a8
1 file changed
File renamed without changes.
0 commit comments