1
Fork 0
rust/tests/ui/hygiene/issue-32922.rs

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

30 lines
391 B
Rust
Raw Normal View History

2019-06-12 18:18:32 +03:00
// check-pass
2016-04-13 00:15:37 +00:00
macro_rules! foo { () => {
let x = 1;
macro_rules! bar { () => {x} }
let _ = bar!();
}}
2016-09-27 06:38:17 +00:00
macro_rules! m { // test issue #31856
2016-04-14 01:20:22 +00:00
($n:ident) => (
let a = 1;
let $n = a;
)
}
2016-04-15 02:22:34 +00:00
macro_rules! baz {
($i:ident) => {
let mut $i = 2;
$i = $i + 1;
}
}
fn main() {
2016-04-14 01:20:22 +00:00
foo! {};
bar! {};
2016-04-15 02:22:34 +00:00
let mut a = true;
baz!(a);
2016-04-14 01:20:22 +00:00
}