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