2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2013-07-26 16:30:05 -04:00
|
|
|
// shouldn't affect evaluation of $ex:
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2015-01-02 14:44:21 -08:00
|
|
|
macro_rules! bad_macro {
|
2015-01-25 22:05:03 +01:00
|
|
|
($ex:expr) => ({let _x = 9; $ex})
|
2015-01-02 14:44:21 -08:00
|
|
|
}
|
|
|
|
|
2013-09-25 00:43:37 -07:00
|
|
|
pub fn main() {
|
2015-01-25 22:05:03 +01:00
|
|
|
let _x = 8;
|
|
|
|
assert_eq!(bad_macro!(_x),8)
|
2013-07-26 16:30:05 -04:00
|
|
|
}
|