-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add precise_pointer_size_matching feature
- Loading branch information
Showing
6 changed files
with
42 additions
and
2 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
14 changes: 14 additions & 0 deletions
14
src/test/ui/feature-gates/feature-gate-precise_pointer_size_matching.rs
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#![feature(exclusive_range_pattern)] | ||
|
||
use std::usize::MAX; | ||
|
||
fn main() { | ||
match 0usize { //~ERROR non-exhaustive patterns: `_` not covered | ||
0..=MAX => {} | ||
} | ||
|
||
match 0isize { //~ERROR non-exhaustive patterns: `_` not covered | ||
1..=20 => {} | ||
-5..3 => {} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/test/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
error[E0004]: non-exhaustive patterns: `_` not covered | ||
--> $DIR/feature-gate-precise_pointer_size_matching.rs:6:11 | ||
| | ||
LL | match 0usize { //~ERROR non-exhaustive patterns: `_` not covered | ||
| ^^^^^^ pattern `_` not covered | ||
|
||
error[E0004]: non-exhaustive patterns: `_` not covered | ||
--> $DIR/feature-gate-precise_pointer_size_matching.rs:10:11 | ||
| | ||
LL | match 0isize { //~ERROR non-exhaustive patterns: `_` not covered | ||
| ^^^^^^ pattern `_` not covered | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0004`. |