diff --git a/src/test/ui/const-generics/const-parameter-uppercase-lint.rs b/src/test/ui/const-generics/const-parameter-uppercase-lint.rs new file mode 100644 index 00000000000..37fe9af98b3 --- /dev/null +++ b/src/test/ui/const-generics/const-parameter-uppercase-lint.rs @@ -0,0 +1,8 @@ +#![feature(const_generics)] +//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash + +#![deny(non_upper_case_globals)] + +fn noop() { + //~^ ERROR const generics in any position are currently unsupported +} diff --git a/src/test/ui/const-generics/const-parameter-uppercase-lint.stderr b/src/test/ui/const-generics/const-parameter-uppercase-lint.stderr new file mode 100644 index 00000000000..9683e91cef3 --- /dev/null +++ b/src/test/ui/const-generics/const-parameter-uppercase-lint.stderr @@ -0,0 +1,19 @@ +warning: the feature `const_generics` is incomplete and may cause the compiler to crash + --> $DIR/const-parameter-uppercase-lint.rs:1:12 + | +LL | #![feature(const_generics)] + | ^^^^^^^^^^^^^^ + +error[E0601]: `main` function not found in crate `const_parameter_uppercase_lint` + | + = note: consider adding a `main` function to `$DIR/const-parameter-uppercase-lint.rs` + +error: const generics in any position are currently unsupported + --> $DIR/const-parameter-uppercase-lint.rs:6:15 + | +LL | fn noop() { + | ^ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0601`.