rust/src/test/ui/resolve/issue-65035-static-with-parent-generics.stderr

55 lines
2.1 KiB
Plaintext
Raw Normal View History

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
--> $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
error: aborting due to 5 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0401`.