2019-10-05 10:55:58 -05:00
|
|
|
error[E0401]: can't use generic parameters from outer function
|
|
|
|
--> $DIR/issue-65035-static-with-parent-generics.rs:6:26
|
|
|
|
|
|
|
|
|
LL | fn f<T>() {
|
|
|
|
| - type parameter from outer function
|
|
|
|
LL | extern "C" {
|
|
|
|
LL | static a: *const T;
|
|
|
|
| ^ use of generic parameter from outer function
|
|
|
|
|
|
|
|
error[E0401]: can't use generic parameters from outer function
|
|
|
|
--> $DIR/issue-65035-static-with-parent-generics.rs:12:22
|
|
|
|
|
|
|
|
|
LL | fn g<T: Default>() {
|
|
|
|
| - type parameter from outer function
|
|
|
|
LL | static a: *const T = Default::default();
|
|
|
|
| ^ use of generic parameter from outer function
|
|
|
|
|
|
|
|
error[E0401]: can't use generic parameters from outer function
|
|
|
|
--> $DIR/issue-65035-static-with-parent-generics.rs:18:24
|
|
|
|
|
|
|
|
|
LL | fn h<const N: usize>() {
|
|
|
|
| - const parameter from outer function
|
|
|
|
LL | extern "C" {
|
|
|
|
LL | static a: [u8; N];
|
|
|
|
| ^ use of generic parameter from outer function
|
|
|
|
|
|
|
|
error[E0401]: can't use generic parameters from outer function
|
|
|
|
--> $DIR/issue-65035-static-with-parent-generics.rs:24:20
|
|
|
|
|
|
|
|
|
LL | fn i<const N: usize>() {
|
|
|
|
| - const parameter from outer function
|
|
|
|
LL | static a: [u8; N] = [0; N];
|
|
|
|
| ^ use of generic parameter from outer function
|
|
|
|
|
|
|
|
error[E0401]: can't use generic parameters from outer function
|
|
|
|
--> $DIR/issue-65035-static-with-parent-generics.rs:24:29
|
|
|
|
|
|
|
|
|
LL | fn i<const N: usize>() {
|
|
|
|
| - const parameter from outer function
|
|
|
|
LL | static a: [u8; N] = [0; N];
|
|
|
|
| ^ use of generic parameter from outer function
|
|
|
|
|
2020-04-22 03:21:32 -05:00
|
|
|
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
|
2019-10-05 10:55:58 -05:00
|
|
|
--> $DIR/issue-65035-static-with-parent-generics.rs:1:12
|
|
|
|
|
|
|
|
|
LL | #![feature(const_generics)]
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `#[warn(incomplete_features)]` on by default
|
2020-04-22 03:21:32 -05:00
|
|
|
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
|
2019-10-05 10:55:58 -05:00
|
|
|
|
2020-04-11 23:16:38 -05:00
|
|
|
error: aborting due to 5 previous errors; 1 warning emitted
|
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`.
|