2019-07-27 00:54:25 +03:00
|
|
|
// run-pass
|
2013-09-20 23:37:19 -07:00
|
|
|
// shouldn't affect evaluation of $ex:
|
2015-01-02 14:44:21 -08:00
|
|
|
macro_rules! bad_macro {
|
|
|
|
($ex:expr) => ({(|_x| { $ex }) (9) })
|
|
|
|
}
|
2013-09-20 23:37:19 -07:00
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
fn takes_x(_x : isize) {
|
2013-09-20 23:37:19 -07:00
|
|
|
assert_eq!(bad_macro!(_x),8);
|
|
|
|
}
|
|
|
|
fn main() {
|
|
|
|
takes_x(8);
|
|
|
|
}
|