]>
git.proxmox.com Git - rustc.git/blob - tests/ui/hygiene/hygienic-labels-in-let.rs
2 #![allow(unreachable_code)]
3 #![allow(unused_labels)]
5 // Test that labels injected by macros do not break hygiene. This
6 // checks cases where the macros invocations are under the rhs of a
9 // Issue #24278: The label/lifetime shadowing checker from #24162
10 // conservatively ignores hygiene, and thus issues warnings that are
11 // both true- and false-positives for this test.
15 // $e shouldn't be able to interact with this 'x
22 macro_rules
! while_true
{
24 // $e shouldn't be able to interact with this 'x
25 'x
: while 1 + 1 == 2 {
31 macro_rules
! run_once
{
45 // this 'x should refer to the outer loop, lexically
66 while_true
!(break 'x
);
76 run_once
!(continue 'x
);