-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid emitting the non_exhaustive error if other errors already occurred
- Loading branch information
Showing
11 changed files
with
34 additions
and
90 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
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,39 +1,14 @@ | ||
error: `[closure@$DIR/non-structural-match-types.rs:9:17: 9:19]` cannot be used in patterns | ||
--> $DIR/non-structural-match-types.rs:9:9 | ||
| | ||
LL | const { || {} } => {}, | ||
LL | const { || {} } => {} | ||
| ^^^^^^^^^^^^^^^ | ||
|
||
error: `[async block@$DIR/non-structural-match-types.rs:12:17: 12:25]` cannot be used in patterns | ||
--> $DIR/non-structural-match-types.rs:12:9 | ||
| | ||
LL | const { async {} } => {}, | ||
LL | const { async {} } => {} | ||
| ^^^^^^^^^^^^^^^^^^ | ||
|
||
error[E0004]: non-exhaustive patterns: `_` not covered | ||
--> $DIR/non-structural-match-types.rs:8:11 | ||
| | ||
LL | match loop {} { | ||
| ^^^^^^^ pattern `_` not covered | ||
| | ||
= note: the matched value is of type `[closure@$DIR/non-structural-match-types.rs:9:17: 9:19]` | ||
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown | ||
| | ||
LL | const { || {} } => {}, _ => todo!(), | ||
| ++++++++++++++ | ||
|
||
error[E0004]: non-exhaustive patterns: `_` not covered | ||
--> $DIR/non-structural-match-types.rs:11:11 | ||
| | ||
LL | match loop {} { | ||
| ^^^^^^^ pattern `_` not covered | ||
| | ||
= note: the matched value is of type `[async block@$DIR/non-structural-match-types.rs:12:17: 12:25]` | ||
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown | ||
| | ||
LL | const { async {} } => {}, _ => todo!(), | ||
| ++++++++++++++ | ||
|
||
error: aborting due to 4 previous errors | ||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0004`. |
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