]>
Commit | Line | Data |
---|---|---|
e74abb32 XL |
1 | error[E0401]: can't use generic parameters from outer function |
2 | --> $DIR/issue-65035-static-with-parent-generics.rs:6:26 | |
3 | | | |
4 | LL | fn f<T>() { | |
5 | | - type parameter from outer function | |
6 | LL | extern "C" { | |
7 | LL | static a: *const T; | |
8 | | ^ use of generic parameter from outer function | |
9 | ||
10 | error[E0401]: can't use generic parameters from outer function | |
11 | --> $DIR/issue-65035-static-with-parent-generics.rs:12:22 | |
12 | | | |
13 | LL | fn g<T: Default>() { | |
14 | | - type parameter from outer function | |
15 | LL | static a: *const T = Default::default(); | |
16 | | ^ use of generic parameter from outer function | |
17 | ||
18 | error[E0401]: can't use generic parameters from outer function | |
19 | --> $DIR/issue-65035-static-with-parent-generics.rs:18:24 | |
20 | | | |
21 | LL | fn h<const N: usize>() { | |
22 | | - const parameter from outer function | |
23 | LL | extern "C" { | |
24 | LL | static a: [u8; N]; | |
25 | | ^ use of generic parameter from outer function | |
26 | ||
27 | error[E0401]: can't use generic parameters from outer function | |
28 | --> $DIR/issue-65035-static-with-parent-generics.rs:24:20 | |
29 | | | |
30 | LL | fn i<const N: usize>() { | |
31 | | - const parameter from outer function | |
32 | LL | static a: [u8; N] = [0; N]; | |
33 | | ^ use of generic parameter from outer function | |
34 | ||
35 | error[E0401]: can't use generic parameters from outer function | |
36 | --> $DIR/issue-65035-static-with-parent-generics.rs:24:29 | |
37 | | | |
38 | LL | fn i<const N: usize>() { | |
39 | | - const parameter from outer function | |
40 | LL | static a: [u8; N] = [0; N]; | |
41 | | ^ use of generic parameter from outer function | |
42 | ||
f9f354fc | 43 | warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes |
e74abb32 XL |
44 | --> $DIR/issue-65035-static-with-parent-generics.rs:1:12 |
45 | | | |
46 | LL | #![feature(const_generics)] | |
47 | | ^^^^^^^^^^^^^^ | |
48 | | | |
49 | = note: `#[warn(incomplete_features)]` on by default | |
f9f354fc | 50 | = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information |
e74abb32 | 51 | |
ba9703b0 | 52 | error: aborting due to 5 previous errors; 1 warning emitted |
e74abb32 XL |
53 | |
54 | For more information about this error, try `rustc --explain E0401`. |