2023-09-10 16:06:14 -05:00
|
|
|
error[E0401]: can't use generic parameters from outer item
|
2021-08-27 11:04:57 -05:00
|
|
|
--> $DIR/issue-65035-static-with-parent-generics.rs:3:26
|
2019-10-05 10:55:58 -05:00
|
|
|
|
|
|
|
|
LL | fn f<T>() {
|
2023-09-10 16:06:14 -05:00
|
|
|
| - type parameter from outer item
|
2019-10-05 10:55:58 -05:00
|
|
|
LL | extern "C" {
|
|
|
|
LL | static a: *const T;
|
2023-09-10 16:06:14 -05:00
|
|
|
| ^ use of generic parameter from outer item
|
2019-10-05 10:55:58 -05:00
|
|
|
|
2023-09-10 16:06:14 -05:00
|
|
|
error[E0401]: can't use generic parameters from outer item
|
2021-08-27 11:04:57 -05:00
|
|
|
--> $DIR/issue-65035-static-with-parent-generics.rs:9:22
|
2019-10-05 10:55:58 -05:00
|
|
|
|
|
|
|
|
LL | fn g<T: Default>() {
|
2023-09-10 16:06:14 -05:00
|
|
|
| - type parameter from outer item
|
2019-10-05 10:55:58 -05:00
|
|
|
LL | static a: *const T = Default::default();
|
2023-09-10 16:06:14 -05:00
|
|
|
| ^ use of generic parameter from outer item
|
2019-10-05 10:55:58 -05:00
|
|
|
|
2023-09-10 16:06:14 -05:00
|
|
|
error[E0401]: can't use generic parameters from outer item
|
2021-08-27 11:04:57 -05:00
|
|
|
--> $DIR/issue-65035-static-with-parent-generics.rs:15:24
|
2019-10-05 10:55:58 -05:00
|
|
|
|
|
|
|
|
LL | fn h<const N: usize>() {
|
2023-09-10 16:06:14 -05:00
|
|
|
| - const parameter from outer item
|
2019-10-05 10:55:58 -05:00
|
|
|
LL | extern "C" {
|
|
|
|
LL | static a: [u8; N];
|
2023-09-10 16:06:14 -05:00
|
|
|
| ^ use of generic parameter from outer item
|
2019-10-05 10:55:58 -05:00
|
|
|
|
2023-09-10 16:06:14 -05:00
|
|
|
error[E0401]: can't use generic parameters from outer item
|
2021-08-27 11:04:57 -05:00
|
|
|
--> $DIR/issue-65035-static-with-parent-generics.rs:21:20
|
2019-10-05 10:55:58 -05:00
|
|
|
|
|
|
|
|
LL | fn i<const N: usize>() {
|
2023-09-10 16:06:14 -05:00
|
|
|
| - const parameter from outer item
|
2019-10-05 10:55:58 -05:00
|
|
|
LL | static a: [u8; N] = [0; N];
|
2023-09-10 16:06:14 -05:00
|
|
|
| ^ use of generic parameter from outer item
|
2019-10-05 10:55:58 -05:00
|
|
|
|
2023-09-10 16:06:14 -05:00
|
|
|
error[E0401]: can't use generic parameters from outer item
|
2021-08-27 11:04:57 -05:00
|
|
|
--> $DIR/issue-65035-static-with-parent-generics.rs:21:29
|
2019-10-05 10:55:58 -05:00
|
|
|
|
|
|
|
|
LL | fn i<const N: usize>() {
|
2023-09-10 16:06:14 -05:00
|
|
|
| - const parameter from outer item
|
2019-10-05 10:55:58 -05:00
|
|
|
LL | static a: [u8; N] = [0; N];
|
2023-09-10 16:06:14 -05:00
|
|
|
| ^ use of generic parameter from outer item
|
2019-10-05 10:55:58 -05:00
|
|
|
|
2021-08-27 11:04:57 -05:00
|
|
|
error: aborting due to 5 previous errors
|
2019-10-05 10:55:58 -05:00
|
|
|
|
2020-04-11 23:16:38 -05:00
|
|
|
For more information about this error, try `rustc --explain E0401`.
|