rust/tests/ui/binding/let-var-hygiene.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
185 B
Rust
Raw Normal View History

// run-pass
// shouldn't affect evaluation of $ex:
macro_rules! bad_macro {
2015-01-25 22:05:03 +01:00
($ex:expr) => ({let _x = 9; $ex})
}
pub fn main() {
2015-01-25 22:05:03 +01:00
let _x = 8;
assert_eq!(bad_macro!(_x),8)
}