Closed
Description
fn main() {
macro_rules! foo {
() => {
let var = 2;
dbg!(var);
};
}
foo!();
var;
}
cargo check
error[E0425]: cannot find value `var` in this scope
--> src/main.rs:9:5
|
9 | var;
| ^^^ not found in this scope
|
from line9 open complete list output
var i32 [LS]
self:: [LS]
crate:: [LS]
foo!() macro_rules! foo [LS]
main()~ fn() [LS]
...
rust-analyzer version: rust-analyzer 1.74.0 (79e9716c 2023-11-13)
and rust-analyzer 1.77.0-nightly (bf8716f1 2023-12-24)
rustc version: rustc 1.74.0 (79e9716c9 2023-11-13)
and rustc 1.77.0-nightly (bf8716f1c 2023-12-24)
relevant settings: NONE