]> git.proxmox.com Git - rustc.git/blame - src/librustc_error_codes/error_codes/E0767.md
New upstream version 1.47.0+dfsg1
[rustc.git] / src / librustc_error_codes / error_codes / E0767.md
CommitLineData
f035d41b
XL
1An unreachable label was used.
2
3Erroneous code example:
4
5```compile_fail,E0767
6'a: loop {
7 || {
8 loop { break 'a } // error: use of unreachable label `'a`
9 };
10}
11```
12
13Ensure that the label is within scope. Labels are not reachable through
14functions, closures, async blocks or modules. Example:
15
16```
17'a: loop {
18 break 'a; // ok!
19}
20```