rust/src/test/ui/for-loop-while/loop-label-shadowing.rs
Bart Massey ed56f86781 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`.
2019-11-15 16:31:30 -08:00

12 lines
195 B
Rust

// run-pass
// Issue #12512.
// pretty-expanded FIXME #23616
fn main() {
let mut foo = Vec::new();
#[allow(unused_labels)]
'foo: for i in &[1, 2, 3] {
foo.push(*i);
}
}