From ed56f867818f7f3fb29dac3cfc0faf316909fd23 Mon Sep 17 00:00:00 2001 From: Bart Massey Date: Tue, 12 Nov 2019 03:19:40 -0800 Subject: Cleaned up unused labels Deleted unused labels from compiler and fixed or allowed unused labels in tests. This patch removes some gratuitous unused labels and turns off the warning for unused labels that are a necessary part of tests. This will permit setting the `unused_labels` lint to `warn`. --- src/libstd/keyword_docs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/keyword_docs.rs b/src/libstd/keyword_docs.rs index d025a7d16f2..4b237c1d1b6 100644 --- a/src/libstd/keyword_docs.rs +++ b/src/libstd/keyword_docs.rs @@ -57,7 +57,7 @@ mod as_keyword { } /// 'outer: for i in 1..=5 { /// println!("outer iteration (i): {}", i); /// -/// 'inner: for j in 1..=200 { +/// '_inner: for j in 1..=200 { /// println!(" inner iteration (j): {}", j); /// if j >= 3 { /// // breaks from inner loop, let's outer loop continue. @@ -178,7 +178,7 @@ mod const_keyword { } ///```rust /// // Print Odd numbers under 30 with unit <= 5 /// 'tens: for ten in 0..3 { -/// 'units: for unit in 0..=9 { +/// '_units: for unit in 0..=9 { /// if unit % 2 == 0 { /// continue; /// } -- cgit 1.4.1-3-g733a5