mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 06:22:00 +00:00
11 lines
194 B
Rust
11 lines
194 B
Rust
// run-pass
|
|
macro_rules! third {
|
|
($e:expr) => ({let x = 2; $e[x]})
|
|
}
|
|
|
|
fn main() {
|
|
let x = vec![10_usize,11_usize,12_usize,13_usize];
|
|
let t = third!(x);
|
|
assert_eq!(t,12_usize);
|
|
}
|