add test program

A test for the issue where the variable meta is mistakenly treated as a reserved keyword.
This commit is contained in:
KaiTomotake 2026-01-19 17:06:07 +09:00
parent 3d087e6044
commit eeed3376e2
No known key found for this signature in database
GPG key ID: F60AB32A541DEB5B
2 changed files with 16 additions and 0 deletions

View 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]
}

View 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`.