rust/tests/ui/issues/issue-15189.rs

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

11 lines
194 B
Rust
Raw Normal View History

// run-pass
macro_rules! third {
($e:expr) => ({let x = 2; $e[x]})
}
2014-06-25 19:08:08 -05:00
fn main() {
let x = vec![10_usize,11_usize,12_usize,13_usize];
2014-06-25 19:08:08 -05:00
let t = third!(x);
assert_eq!(t,12_usize);
2014-06-25 19:08:08 -05:00
}