-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8fd85db
commit d426771
Showing
6 changed files
with
113 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
warning: floating-point types cannot be used in patterns | ||
--> $DIR/deduplicate-diagnostics-2.rs:7:9 | ||
| | ||
LL | 1.0 => {} | ||
| ^^^ | ||
| | ||
= note: `#[warn(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 | ||
| | ||
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 | ||
| | ||
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> | ||
|
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,37 @@ | ||
warning: floating-point types cannot be used in patterns | ||
--> $DIR/deduplicate-diagnostics-2.rs:7:9 | ||
| | ||
LL | 1.0 => {} | ||
| ^^^ | ||
| | ||
= note: `#[warn(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 | ||
| | ||
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 | ||
| | ||
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 | ||
| | ||
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> | ||
|
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,17 @@ | ||
// build-pass | ||
// revisions: duplicate deduplicate | ||
//[deduplicate] compile-flags: -Z deduplicate-diagnostics=yes | ||
|
||
fn main() { | ||
match 0.0 { | ||
1.0 => {} //~ WARNING floating-point types cannot be used in patterns | ||
//~| WARNING this was previously accepted | ||
//~| WARNING floating-point types cannot be used in patterns | ||
//~| WARNING this was previously accepted | ||
2.0 => {} //~ WARNING floating-point types cannot be used in patterns | ||
//~| WARNING this was previously accepted | ||
//[duplicate]~| WARNING floating-point types cannot be used in patterns | ||
//[duplicate]~| WARNING this was previously accepted | ||
_ => {} | ||
} | ||
} |
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,8 +1,15 @@ | ||
error[E0452]: malformed lint attribute input | ||
--> $DIR/deduplicate-diagnostics.rs:8:8 | ||
| | ||
LL | #[deny("literal")] | ||
| ^^^^^^^^^ bad attribute argument | ||
|
||
error: cannot find derive macro `Unresolved` in this scope | ||
--> $DIR/deduplicate-diagnostics.rs:4:10 | ||
| | ||
LL | #[derive(Unresolved)] | ||
| ^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0452`. |
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