summaryrefslogtreecommitdiffstats
path: root/src/test/ui/resolve/resolve-label.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/resolve/resolve-label.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/resolve/resolve-label.rs b/src/test/ui/resolve/resolve-label.rs
new file mode 100644
index 000000000..ac5410cd3
--- /dev/null
+++ b/src/test/ui/resolve/resolve-label.rs
@@ -0,0 +1,13 @@
+fn f() {
+ 'l: loop {
+ fn g() {
+ loop {
+ break 'l; //~ ERROR use of unreachable label
+ }
+ }
+ }
+
+ loop { 'w: while break 'w { } }
+}
+
+fn main() {}