forked from rust-lang/rust
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#88966 - tmiasko:block-label-shadowing, r=pe…
…trochenkov Check for shadowing issues involving block labels
- Loading branch information
Showing
7 changed files
with
61 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,74 @@ | ||
warning: label name `'fl` shadows a label name that is already in scope | ||
--> $DIR/loops-reject-duplicate-labels.rs:10:5 | ||
--> $DIR/loops-reject-duplicate-labels.rs:9:5 | ||
| | ||
LL | 'fl: for _ in 0..10 { break; } | ||
| --- first declared here | ||
LL | 'fl: loop { break; } | ||
| ^^^ label `'fl` already in scope | ||
|
||
warning: label name `'lf` shadows a label name that is already in scope | ||
--> $DIR/loops-reject-duplicate-labels.rs:13:5 | ||
--> $DIR/loops-reject-duplicate-labels.rs:12:5 | ||
| | ||
LL | 'lf: loop { break; } | ||
| --- first declared here | ||
LL | 'lf: for _ in 0..10 { break; } | ||
| ^^^ label `'lf` already in scope | ||
|
||
warning: label name `'wl` shadows a label name that is already in scope | ||
--> $DIR/loops-reject-duplicate-labels.rs:15:5 | ||
--> $DIR/loops-reject-duplicate-labels.rs:14:5 | ||
| | ||
LL | 'wl: while 2 > 1 { break; } | ||
| --- first declared here | ||
LL | 'wl: loop { break; } | ||
| ^^^ label `'wl` already in scope | ||
|
||
warning: label name `'lw` shadows a label name that is already in scope | ||
--> $DIR/loops-reject-duplicate-labels.rs:17:5 | ||
--> $DIR/loops-reject-duplicate-labels.rs:16:5 | ||
| | ||
LL | 'lw: loop { break; } | ||
| --- first declared here | ||
LL | 'lw: while 2 > 1 { break; } | ||
| ^^^ label `'lw` already in scope | ||
|
||
warning: label name `'fw` shadows a label name that is already in scope | ||
--> $DIR/loops-reject-duplicate-labels.rs:19:5 | ||
--> $DIR/loops-reject-duplicate-labels.rs:18:5 | ||
| | ||
LL | 'fw: for _ in 0..10 { break; } | ||
| --- first declared here | ||
LL | 'fw: while 2 > 1 { break; } | ||
| ^^^ label `'fw` already in scope | ||
|
||
warning: label name `'wf` shadows a label name that is already in scope | ||
--> $DIR/loops-reject-duplicate-labels.rs:21:5 | ||
--> $DIR/loops-reject-duplicate-labels.rs:20:5 | ||
| | ||
LL | 'wf: while 2 > 1 { break; } | ||
| --- first declared here | ||
LL | 'wf: for _ in 0..10 { break; } | ||
| ^^^ label `'wf` already in scope | ||
|
||
warning: label name `'tl` shadows a label name that is already in scope | ||
--> $DIR/loops-reject-duplicate-labels.rs:23:5 | ||
--> $DIR/loops-reject-duplicate-labels.rs:22:5 | ||
| | ||
LL | 'tl: while let Some(_) = None::<i32> { break; } | ||
| --- first declared here | ||
LL | 'tl: loop { break; } | ||
| ^^^ label `'tl` already in scope | ||
|
||
warning: label name `'lt` shadows a label name that is already in scope | ||
--> $DIR/loops-reject-duplicate-labels.rs:25:5 | ||
--> $DIR/loops-reject-duplicate-labels.rs:24:5 | ||
| | ||
LL | 'lt: loop { break; } | ||
| --- first declared here | ||
LL | 'lt: while let Some(_) = None::<i32> { break; } | ||
| ^^^ label `'lt` already in scope | ||
|
||
warning: 8 warnings emitted | ||
warning: label name `'bl` shadows a label name that is already in scope | ||
--> $DIR/loops-reject-duplicate-labels.rs:27:5 | ||
| | ||
LL | 'bl: {} | ||
| --- first declared here | ||
LL | 'bl: {} | ||
| ^^^ label `'bl` already in scope | ||
|
||
warning: 9 warnings emitted | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters