about summary refs log tree commit diff
path: root/src/librustc_error_codes/error_codes
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-07-02 23:18:15 +0000
committerbors <bors@rust-lang.org>2020-07-02 23:18:15 +0000
commit5f4abc16e1b2cb035eee6a5079ce45ce924c1f33 (patch)
tree327e15fe3a91f01c5b4cf23b2a31366b384e97bd /src/librustc_error_codes/error_codes
parent3503f565e1fb7296983757d2716346f48a4a262b (diff)
parent7bd2f97cb61d4578ac55d54bfdfc7c4ade752374 (diff)
downloadrust-5f4abc16e1b2cb035eee6a5079ce45ce924c1f33.tar.gz
rust-5f4abc16e1b2cb035eee6a5079ce45ce924c1f33.zip
Auto merge of #73977 - Manishearth:rollup-2x4s7c6, r=Manishearth
Rollup of 8 pull requests

Successful merges:

 - #73454 (Move contributing.md to rustc-dev-guide and point at getting started)
 - #73724 (Use WASM's saturating casts if they are available)
 - #73726 (resolve: disallow labelled breaks/continues through closures/async blocks)
 - #73753 (Use 'tcx for references to AccessLevels wherever possible.)
 - #73781 (Update psm version)
 - #73952 (Add option for local docker testing.)
 - #73957 (disable BTree min_max test in Miri for now)
 - #73975 (Document rustc_ast::ast::Pat)

Failed merges:

r? @ghost
Diffstat (limited to 'src/librustc_error_codes/error_codes')
-rw-r--r--src/librustc_error_codes/error_codes/E0767.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/librustc_error_codes/error_codes/E0767.md b/src/librustc_error_codes/error_codes/E0767.md
new file mode 100644
index 00000000000..679fe7e41e9
--- /dev/null
+++ b/src/librustc_error_codes/error_codes/E0767.md
@@ -0,0 +1,20 @@
+An unreachable label was used.
+
+Erroneous code example:
+
+```compile_fail,E0767
+'a: loop {
+    || {
+        loop { break 'a } // error: use of unreachable label `'a`
+    };
+}
+```
+
+Ensure that the label is within scope. Labels are not reachable through
+functions, closures, async blocks or modules. Example:
+
+```
+'a: loop {
+    break 'a; // ok!
+}
+```