File tree 6 files changed +113
-2
lines changed
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
+
1
7
error: cannot find derive macro `Unresolved` in this scope
2
8
--> $DIR/deduplicate-diagnostics.rs:4:10
3
9
|
4
10
LL | #[derive(Unresolved)]
5
11
| ^^^^^^^^^^
6
12
7
- error: aborting due to previous error
13
+ error: aborting due to 2 previous errors
8
14
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
+
1
7
error: cannot find derive macro `Unresolved` in this scope
2
8
--> $DIR/deduplicate-diagnostics.rs:4:10
3
9
|
@@ -10,5 +16,18 @@ error: cannot find derive macro `Unresolved` in this scope
10
16
LL | #[derive(Unresolved)]
11
17
| ^^^^^^^^^^
12
18
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
14
32
33
+ For more information about this error, try `rustc --explain E0452`.
Original file line number Diff line number Diff line change 5
5
//[duplicate]~| ERROR cannot find derive macro `Unresolved` in this scope
6
6
struct S ;
7
7
8
+ #[ deny( "literal" ) ] //~ ERROR malformed lint attribute input
9
+ //[duplicate]~| ERROR malformed lint attribute input
10
+ //[duplicate]~| ERROR malformed lint attribute input
8
11
fn main ( ) { }
You can’t perform that action at this time.
0 commit comments