Sign in
◑
Theme
rust
/
rust
/
c1d608bb7e862c8d8b74ce7cfc042fa98e9d4792
/
.
/
tests
/
ui
/
macros
/
for-loop-macro-rules-hygiene.rs
blob: fcebda1b9da82774d35828a34bb73431262cf70f [
file
]
//! Regression test for https://github.com/rust-lang/rust/issues/15189
//@ 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
);
}