Add ui test for #99910

This commit is contained in:
Obei Sideg 2022-08-04 01:23:24 +03:00
parent accb8e34c5
commit b3f32d1e8b
3 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,8 @@
// run-rustfix
fn main() {
const _FOO: i32 = 123;
//~^ ERROR const` and `let` are mutually exclusive
const _BAR: i32 = 123;
//~^ ERROR `const` and `let` are mutually exclusive
}

View File

@ -0,0 +1,8 @@
// run-rustfix
fn main() {
const let _FOO: i32 = 123;
//~^ ERROR const` and `let` are mutually exclusive
let const _BAR: i32 = 123;
//~^ ERROR `const` and `let` are mutually exclusive
}

View File

@ -0,0 +1,14 @@
error: `const` and `let` are mutually exclusive
--> $DIR/issue-99910-const-let-mutually-exclusive.rs:4:5
|
LL | const let _FOO: i32 = 123;
| ^^^^^^^^^ help: remove `let`: `const`
error: `const` and `let` are mutually exclusive
--> $DIR/issue-99910-const-let-mutually-exclusive.rs:6:5
|
LL | let const _BAR: i32 = 123;
| ^^^^^^^^^ help: remove `let`: `const`
error: aborting due to 2 previous errors