-
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.
Deny floating point literals in patterns
- Loading branch information
1 parent
1255053
commit 38cb1fe
Showing
6 changed files
with
30 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
warning: floating-point types cannot be used in patterns | ||
--> $DIR/deduplicate-diagnostics-2.rs:7:9 | ||
error: floating-point types cannot be used in patterns | ||
--> $DIR/deduplicate-diagnostics-2.rs:6:9 | ||
| | ||
LL | 1.0 => {} | ||
| ^^^ | ||
| | ||
= note: `#[warn(illegal_floating_point_literal_pattern)]` on by default | ||
= note: `#[deny(illegal_floating_point_literal_pattern)]` on by default | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #41620 </~https://github.com/rust-lang/rust/issues/41620> | ||
|
||
warning: floating-point types cannot be used in patterns | ||
--> $DIR/deduplicate-diagnostics-2.rs:11:9 | ||
error: floating-point types cannot be used in patterns | ||
--> $DIR/deduplicate-diagnostics-2.rs:10:9 | ||
| | ||
LL | 2.0 => {} | ||
| ^^^ | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #41620 </~https://github.com/rust-lang/rust/issues/41620> | ||
|
||
warning: floating-point types cannot be used in patterns | ||
--> $DIR/deduplicate-diagnostics-2.rs:7:9 | ||
error: floating-point types cannot be used in patterns | ||
--> $DIR/deduplicate-diagnostics-2.rs:6:9 | ||
| | ||
LL | 1.0 => {} | ||
| ^^^ | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #41620 </~https://github.com/rust-lang/rust/issues/41620> | ||
|
||
warning: 3 warnings emitted | ||
error: aborting due to 3 previous errors | ||
|
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,39 @@ | ||
warning: floating-point types cannot be used in patterns | ||
--> $DIR/deduplicate-diagnostics-2.rs:7:9 | ||
error: floating-point types cannot be used in patterns | ||
--> $DIR/deduplicate-diagnostics-2.rs:6:9 | ||
| | ||
LL | 1.0 => {} | ||
| ^^^ | ||
| | ||
= note: `#[warn(illegal_floating_point_literal_pattern)]` on by default | ||
= note: `#[deny(illegal_floating_point_literal_pattern)]` on by default | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #41620 </~https://github.com/rust-lang/rust/issues/41620> | ||
|
||
warning: floating-point types cannot be used in patterns | ||
--> $DIR/deduplicate-diagnostics-2.rs:11:9 | ||
error: floating-point types cannot be used in patterns | ||
--> $DIR/deduplicate-diagnostics-2.rs:10:9 | ||
| | ||
LL | 2.0 => {} | ||
| ^^^ | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #41620 </~https://github.com/rust-lang/rust/issues/41620> | ||
|
||
warning: floating-point types cannot be used in patterns | ||
--> $DIR/deduplicate-diagnostics-2.rs:7:9 | ||
error: floating-point types cannot be used in patterns | ||
--> $DIR/deduplicate-diagnostics-2.rs:6:9 | ||
| | ||
LL | 1.0 => {} | ||
| ^^^ | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #41620 </~https://github.com/rust-lang/rust/issues/41620> | ||
|
||
warning: floating-point types cannot be used in patterns | ||
--> $DIR/deduplicate-diagnostics-2.rs:11:9 | ||
error: floating-point types cannot be used in patterns | ||
--> $DIR/deduplicate-diagnostics-2.rs:10:9 | ||
| | ||
LL | 2.0 => {} | ||
| ^^^ | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #41620 </~https://github.com/rust-lang/rust/issues/41620> | ||
|
||
warning: 4 warnings emitted | ||
error: aborting due to 4 previous errors | ||
|
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