mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
12 lines
186 B
Rust
12 lines
186 B
Rust
//@ run-pass
|
|
// shouldn't affect evaluation of $ex:
|
|
|
|
macro_rules! bad_macro {
|
|
($ex:expr) => ({let _x = 9; $ex})
|
|
}
|
|
|
|
pub fn main() {
|
|
let _x = 8;
|
|
assert_eq!(bad_macro!(_x),8)
|
|
}
|