warning: label name `'a` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:20:9 | LL | fn foo<'a>() { | -- first declared here LL | 'a: loop { break 'a; } | ^^ lifetime 'a already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:45:13 | LL | impl<'bad, 'c> Struct<'bad, 'c> { | ---- first declared here LL | fn meth_bad(&self) { LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:52:13 | LL | impl<'b, 'bad> Struct<'b, 'bad> { | ---- first declared here LL | fn meth_bad2(&self) { LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:59:13 | LL | fn meth_bad3<'bad>(x: &'bad i8) { | ---- first declared here LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:64:13 | LL | fn meth_bad4<'a,'bad>(x: &'a i8, y: &'bad i8) { | ---- first declared here LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:71:13 | LL | impl <'bad, 'e> Enum<'bad, 'e> { | ---- first declared here LL | fn meth_bad(&self) { LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:77:13 | LL | impl <'d, 'bad> Enum<'d, 'bad> { | ---- first declared here LL | fn meth_bad2(&self) { LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:83:13 | LL | fn meth_bad3<'bad>(x: &'bad i8) { | ---- first declared here LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:88:13 | LL | fn meth_bad4<'a,'bad>(x: &'bad i8) { | ---- first declared here LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:98:13 | LL | trait HasDefaultMethod1<'bad> { | ---- first declared here ... LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:104:13 | LL | trait HasDefaultMethod2<'a,'bad> { | ---- first declared here LL | fn meth_bad(&self) { LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope warning: label name `'bad` shadows a lifetime name that is already in scope --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:110:13 | LL | fn meth_bad<'bad>(&self) { | ---- first declared here LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope error: compilation successful --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:117:1 | LL | / pub fn main() { //~ ERROR compilation successful LL | | foo(); LL | | } | |_^ error: aborting due to previous error