]> git.lizzy.rs Git - rust.git/blob - src/test/ui/loops/loops-reject-labels-shadowing-lifetimes.stderr
Merge commit '3a31c6d8272c14388a34622193baf553636fe470' into sync_cg_clif-2021-07-07
[rust.git] / src / test / ui / loops / loops-reject-labels-shadowing-lifetimes.stderr
1 warning: label name `'a` shadows a lifetime name that is already in scope
2   --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:10:9
3    |
4 LL |     fn foo<'a>() {
5    |            -- first declared here
6 LL |         'a: loop { break 'a; }
7    |         ^^ lifetime `'a` already in scope
8
9 warning: label name `'bad` shadows a lifetime name that is already in scope
10   --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:35:13
11    |
12 LL |     impl<'bad, 'c> Struct<'bad, 'c> {
13    |          ---- first declared here
14 LL |         fn meth_bad(&self) {
15 LL |             'bad: loop { break 'bad; }
16    |             ^^^^ lifetime `'bad` already in scope
17
18 warning: label name `'bad` shadows a lifetime name that is already in scope
19   --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:42:13
20    |
21 LL |     impl<'b, 'bad> Struct<'b, 'bad> {
22    |              ---- first declared here
23 LL |         fn meth_bad2(&self) {
24 LL |             'bad: loop { break 'bad; }
25    |             ^^^^ lifetime `'bad` already in scope
26
27 warning: label name `'bad` shadows a lifetime name that is already in scope
28   --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:49:13
29    |
30 LL |         fn meth_bad3<'bad>(x: &'bad i8) {
31    |                      ---- first declared here
32 LL |             'bad: loop { break 'bad; }
33    |             ^^^^ lifetime `'bad` already in scope
34
35 warning: label name `'bad` shadows a lifetime name that is already in scope
36   --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:54:13
37    |
38 LL |         fn meth_bad4<'a,'bad>(x: &'a i8, y: &'bad i8) {
39    |                         ---- first declared here
40 LL |             'bad: loop { break 'bad; }
41    |             ^^^^ lifetime `'bad` already in scope
42
43 warning: label name `'bad` shadows a lifetime name that is already in scope
44   --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:61:13
45    |
46 LL |     impl <'bad, 'e> Enum<'bad, 'e> {
47    |           ---- first declared here
48 LL |         fn meth_bad(&self) {
49 LL |             'bad: loop { break 'bad; }
50    |             ^^^^ lifetime `'bad` already in scope
51
52 warning: label name `'bad` shadows a lifetime name that is already in scope
53   --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:67:13
54    |
55 LL |     impl <'d, 'bad> Enum<'d, 'bad> {
56    |               ---- first declared here
57 LL |         fn meth_bad2(&self) {
58 LL |             'bad: loop { break 'bad; }
59    |             ^^^^ lifetime `'bad` already in scope
60
61 warning: label name `'bad` shadows a lifetime name that is already in scope
62   --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:73:13
63    |
64 LL |         fn meth_bad3<'bad>(x: &'bad i8) {
65    |                      ---- first declared here
66 LL |             'bad: loop { break 'bad; }
67    |             ^^^^ lifetime `'bad` already in scope
68
69 warning: label name `'bad` shadows a lifetime name that is already in scope
70   --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:78:13
71    |
72 LL |         fn meth_bad4<'a,'bad>(x: &'bad i8) {
73    |                         ---- first declared here
74 LL |             'bad: loop { break 'bad; }
75    |             ^^^^ lifetime `'bad` already in scope
76
77 warning: label name `'bad` shadows a lifetime name that is already in scope
78   --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:88:13
79    |
80 LL |     trait HasDefaultMethod1<'bad> {
81    |                             ---- first declared here
82 ...
83 LL |             'bad: loop { break 'bad; }
84    |             ^^^^ lifetime `'bad` already in scope
85
86 warning: label name `'bad` shadows a lifetime name that is already in scope
87   --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:94:13
88    |
89 LL |     trait HasDefaultMethod2<'a,'bad> {
90    |                                ---- first declared here
91 LL |         fn meth_bad(&self) {
92 LL |             'bad: loop { break 'bad; }
93    |             ^^^^ lifetime `'bad` already in scope
94
95 warning: label name `'bad` shadows a lifetime name that is already in scope
96   --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:100:13
97    |
98 LL |         fn meth_bad<'bad>(&self) {
99    |                     ---- first declared here
100 LL |             'bad: loop { break 'bad; }
101    |             ^^^^ lifetime `'bad` already in scope
102
103 warning: 12 warnings emitted
104