diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-08 03:39:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-08 03:39:43 +0100 |
| commit | 56f830e292f3af241b65fc2bc08279a0b6d9856a (patch) | |
| tree | 883bd1ca3e3d53bca2f2694749b553b36208959b /src/test/ui/for-loop-while | |
| parent | de17464b14e503edca6625daa9cd4c338ffafee2 (diff) | |
| parent | 34a45a5309dad66025df506a388fbdf1da9afa40 (diff) | |
| download | rust-56f830e292f3af241b65fc2bc08279a0b6d9856a.tar.gz rust-56f830e292f3af241b65fc2bc08279a0b6d9856a.zip | |
Rollup merge of #66325 - BartMassey:master, r=joshtriplett
Change unused_labels from allow to warn Fixes #66324, making the unused_labels lint warn instead of allow by default. I'm told @rust-lang/lang will need to review this, and perhaps will want to do a crater run.
Diffstat (limited to 'src/test/ui/for-loop-while')
| -rw-r--r-- | src/test/ui/for-loop-while/label_break_value.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/for-loop-while/loop-label-shadowing.rs | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/test/ui/for-loop-while/label_break_value.rs b/src/test/ui/for-loop-while/label_break_value.rs index eb5be7742e0..18930ac811e 100644 --- a/src/test/ui/for-loop-while/label_break_value.rs +++ b/src/test/ui/for-loop-while/label_break_value.rs @@ -77,7 +77,7 @@ fn label_break_mixed(v: u32) -> u32 { } // Labeled breaking an outer loop still works 'd: loop { - 'e: { + { if v == r { break 'b; } diff --git a/src/test/ui/for-loop-while/loop-label-shadowing.rs b/src/test/ui/for-loop-while/loop-label-shadowing.rs index acb53e254bb..9bedde67b78 100644 --- a/src/test/ui/for-loop-while/loop-label-shadowing.rs +++ b/src/test/ui/for-loop-while/loop-label-shadowing.rs @@ -5,6 +5,7 @@ fn main() { let mut foo = Vec::new(); + #[allow(unused_labels)] 'foo: for i in &[1, 2, 3] { foo.push(*i); } |
