File tree Expand file tree Collapse file tree 6 files changed +113
-2
lines changed Expand file tree Collapse file tree 6 files changed +113
-2
lines changed Original file line number Diff line number Diff line change 1+ warning: floating-point types cannot be used in patterns
2+ --> $DIR/deduplicate-diagnostics-2.rs:7:9
3+ |
4+ LL | 1.0 => {}
5+ | ^^^
6+ |
7+ = note: `#[warn(illegal_floating_point_literal_pattern)]` on by default
8+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9+ = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
10+
11+ warning: floating-point types cannot be used in patterns
12+ --> $DIR/deduplicate-diagnostics-2.rs:11:9
13+ |
14+ LL | 2.0 => {}
15+ | ^^^
16+ |
17+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
18+ = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
19+
20+ warning: floating-point types cannot be used in patterns
21+ --> $DIR/deduplicate-diagnostics-2.rs:7:9
22+ |
23+ LL | 1.0 => {}
24+ | ^^^
25+ |
26+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
27+ = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
28+
Original file line number Diff line number Diff line change 1+ warning: floating-point types cannot be used in patterns
2+ --> $DIR/deduplicate-diagnostics-2.rs:7:9
3+ |
4+ LL | 1.0 => {}
5+ | ^^^
6+ |
7+ = note: `#[warn(illegal_floating_point_literal_pattern)]` on by default
8+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9+ = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
10+
11+ warning: floating-point types cannot be used in patterns
12+ --> $DIR/deduplicate-diagnostics-2.rs:11:9
13+ |
14+ LL | 2.0 => {}
15+ | ^^^
16+ |
17+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
18+ = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
19+
20+ warning: floating-point types cannot be used in patterns
21+ --> $DIR/deduplicate-diagnostics-2.rs:7:9
22+ |
23+ LL | 1.0 => {}
24+ | ^^^
25+ |
26+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
27+ = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
28+
29+ warning: floating-point types cannot be used in patterns
30+ --> $DIR/deduplicate-diagnostics-2.rs:11:9
31+ |
32+ LL | 2.0 => {}
33+ | ^^^
34+ |
35+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
36+ = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
37+
Original file line number Diff line number Diff line change 1+ // build-pass
2+ // revisions: duplicate deduplicate
3+ //[deduplicate] compile-flags: -Z deduplicate-diagnostics=yes
4+
5+ fn main ( ) {
6+ match 0.0 {
7+ 1.0 => { } //~ WARNING floating-point types cannot be used in patterns
8+ //~| WARNING this was previously accepted
9+ //~| WARNING floating-point types cannot be used in patterns
10+ //~| WARNING this was previously accepted
11+ 2.0 => { } //~ WARNING floating-point types cannot be used in patterns
12+ //~| WARNING this was previously accepted
13+ //[duplicate]~| WARNING floating-point types cannot be used in patterns
14+ //[duplicate]~| WARNING this was previously accepted
15+ _ => { }
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ error[E0452]: malformed lint attribute input
2+ --> $DIR/deduplicate-diagnostics.rs:8:8
3+ |
4+ LL | #[deny("literal")]
5+ | ^^^^^^^^^ bad attribute argument
6+
17error: cannot find derive macro `Unresolved` in this scope
28 --> $DIR/deduplicate-diagnostics.rs:4:10
39 |
410LL | #[derive(Unresolved)]
511 | ^^^^^^^^^^
612
7- error: aborting due to previous error
13+ error: aborting due to 2 previous errors
814
15+ For more information about this error, try `rustc --explain E0452`.
Original file line number Diff line number Diff line change 1+ error[E0452]: malformed lint attribute input
2+ --> $DIR/deduplicate-diagnostics.rs:8:8
3+ |
4+ LL | #[deny("literal")]
5+ | ^^^^^^^^^ bad attribute argument
6+
17error: cannot find derive macro `Unresolved` in this scope
28 --> $DIR/deduplicate-diagnostics.rs:4:10
39 |
@@ -10,5 +16,18 @@ error: cannot find derive macro `Unresolved` in this scope
1016LL | #[derive(Unresolved)]
1117 | ^^^^^^^^^^
1218
13- error: aborting due to 2 previous errors
19+ error[E0452]: malformed lint attribute input
20+ --> $DIR/deduplicate-diagnostics.rs:8:8
21+ |
22+ LL | #[deny("literal")]
23+ | ^^^^^^^^^ bad attribute argument
24+
25+ error[E0452]: malformed lint attribute input
26+ --> $DIR/deduplicate-diagnostics.rs:8:8
27+ |
28+ LL | #[deny("literal")]
29+ | ^^^^^^^^^ bad attribute argument
30+
31+ error: aborting due to 5 previous errors
1432
33+ For more information about this error, try `rustc --explain E0452`.
Original file line number Diff line number Diff line change 55 //[duplicate]~| ERROR cannot find derive macro `Unresolved` in this scope
66struct S ;
77
8+ #[ deny( "literal" ) ] //~ ERROR malformed lint attribute input
9+ //[duplicate]~| ERROR malformed lint attribute input
10+ //[duplicate]~| ERROR malformed lint attribute input
811fn main ( ) { }
You can’t perform that action at this time.
0 commit comments