blob: bf6cee035e2e6148314033522495fc6bd57af4f9 [file] [log] [blame] [edit]
error[E0310]: the parameter type `T` may not live long enough
--> $DIR/missing-param-but-has-colon-144215.rs:4:14
|
LL | struct S<T:>(&'static T);
| ^^^^^^^^^^
| |
| the parameter type `T` must be valid for the static lifetime...
| ...so that the reference type `&'static T` does not outlive the data it points at
|
help: consider adding an explicit lifetime bound
|
LL | struct S<T: 'static>(&'static T);
| +++++++
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0310`.