2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2015-01-02 16:44:21 -06:00
|
|
|
macro_rules! third {
|
|
|
|
($e:expr) => ({let x = 2; $e[x]})
|
|
|
|
}
|
2014-06-25 19:08:08 -05:00
|
|
|
|
|
|
|
fn main() {
|
2016-10-29 16:54:04 -05:00
|
|
|
let x = vec![10_usize,11_usize,12_usize,13_usize];
|
2014-06-25 19:08:08 -05:00
|
|
|
let t = third!(x);
|
2015-02-18 04:42:01 -06:00
|
|
|
assert_eq!(t,12_usize);
|
2014-06-25 19:08:08 -05:00
|
|
|
}
|