mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
13 lines
213 B
Rust
13 lines
213 B
Rust
//@ run-pass
|
|
// shouldn't affect evaluation of $ex:
|
|
macro_rules! bad_macro {
|
|
($ex:expr) => ({(|_x| { $ex }) (9) })
|
|
}
|
|
|
|
fn takes_x(_x : isize) {
|
|
assert_eq!(bad_macro!(_x),8);
|
|
}
|
|
fn main() {
|
|
takes_x(8);
|
|
}
|