]> git.proxmox.com Git - rustc.git/blob - 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
1 An unreachable label was used.
2
3 Erroneous 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
13 Ensure that the label is within scope. Labels are not reachable through
14 functions, closures, async blocks or modules. Example:
15
16 ```
17 'a: loop {
18 break 'a; // ok!
19 }
20 ```