summary refs log tree commit diff
path: root/src/test/run-pass/lambda-var-hygiene.rs
blob: 9cc4cc29bf59d3a09ca38c169c6a74aadd01c116 (plain)
1
2
3
4
5
6
7
8
9
10
11
// 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);
}