mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-18 18:47:29 +00:00
Add a test for const parameter uppercase lint
This commit is contained in:
parent
425fb58cac
commit
727e20410c
@ -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<const x: u32>() {
|
||||||
|
//~^ ERROR const generics in any position are currently unsupported
|
||||||
|
}
|
@ -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<const x: u32>() {
|
||||||
|
| ^
|
||||||
|
|
||||||
|
error: aborting due to 2 previous errors
|
||||||
|
|
||||||
|
For more information about this error, try `rustc --explain E0601`.
|
Loading…
Reference in New Issue
Block a user