summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-15189.rs
blob: a9c884bdcfd8d1bca86f291a4799725a3d2ca073 (plain)
1
2
3
4
5
6
7
8
9
10
// 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);
}