add test program
A test for the issue where the variable meta is mistakenly treated as a reserved keyword.
This commit is contained in:
parent
3d087e6044
commit
eeed3376e2
2 changed files with 16 additions and 0 deletions
7
tests/ui/reserved/meta-is-not-reserved.rs
Normal file
7
tests/ui/reserved/meta-is-not-reserved.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
// Regression test for <https://github.com/rust-lang/rust/issues/61463>
|
||||
// A test for the issue where the variable meta is mistakenly treated as a reserved keyword.
|
||||
|
||||
fn main() {
|
||||
let xyz = meta;
|
||||
//~^ ERROR cannot find value `meta` in this scope [E0425]
|
||||
}
|
||||
9
tests/ui/reserved/meta-is-not-reserved.stderr
Normal file
9
tests/ui/reserved/meta-is-not-reserved.stderr
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
error[E0425]: cannot find value `meta` in this scope
|
||||
--> $DIR/meta-is-not-reserved.rs:5:15
|
||||
|
|
||||
LL | let xyz = meta;
|
||||
| ^^^^ not found in this scope
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0425`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue