Skip to content

Commit 727e204

Browse files
committed
Add a test for const parameter uppercase lint
1 parent 425fb58 commit 727e204

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#![feature(const_generics)]
2+
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
3+
4+
#![deny(non_upper_case_globals)]
5+
6+
fn noop<const x: u32>() {
7+
//~^ ERROR const generics in any position are currently unsupported
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
2+
--> $DIR/const-parameter-uppercase-lint.rs:1:12
3+
|
4+
LL | #![feature(const_generics)]
5+
| ^^^^^^^^^^^^^^
6+
7+
error[E0601]: `main` function not found in crate `const_parameter_uppercase_lint`
8+
|
9+
= note: consider adding a `main` function to `$DIR/const-parameter-uppercase-lint.rs`
10+
11+
error: const generics in any position are currently unsupported
12+
--> $DIR/const-parameter-uppercase-lint.rs:6:15
13+
|
14+
LL | fn noop<const x: u32>() {
15+
| ^
16+
17+
error: aborting due to 2 previous errors
18+
19+
For more information about this error, try `rustc --explain E0601`.

0 commit comments

Comments
 (0)