2023-09-10 21:06:14 +00:00
|
|
|
error[E0401]: can't use generic parameters from outer item
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/inner-static-type-parameter.rs:6:19
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn foo<T>() {
|
2023-09-10 21:06:14 +00:00
|
|
|
| - type parameter from outer item
|
2018-08-08 12:28:26 +00:00
|
|
|
LL | static a: Bar<T> = Bar::What;
|
2023-09-10 21:06:14 +00:00
|
|
|
| ^ use of generic parameter from outer item
|
2024-01-13 19:14:02 +00:00
|
|
|
|
|
|
|
|
= note: a `static` is a separate item from the item that contains it
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-02-01 14:58:07 +00:00
|
|
|
error[E0392]: type parameter `T` is never used
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/inner-static-type-parameter.rs:3:10
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | enum Bar<T> { What }
|
2024-02-01 14:58:07 +00:00
|
|
|
| ^ unused type parameter
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
|
2024-02-01 14:58:07 +00:00
|
|
|
= help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2019-04-17 17:26:38 +00:00
|
|
|
Some errors have detailed explanations: E0392, E0401.
|
2018-08-08 12:28:26 +00:00
|
|
|
For more information about an error, try `rustc --explain E0392`.
|