1
1
error: cannot use NaN in patterns
2
- --> $DIR/issue-6804-nan-match.rs:10 :9
2
+ --> $DIR/issue-6804-nan-match.rs:15 :9
3
3
|
4
4
LL | NAN => {},
5
5
| ^^^
@@ -8,7 +8,7 @@ LL | NAN => {},
8
8
= help: try using the `is_nan` method instead
9
9
10
10
error: cannot use NaN in patterns
11
- --> $DIR/issue-6804-nan-match.rs:15 :10
11
+ --> $DIR/issue-6804-nan-match.rs:20 :10
12
12
|
13
13
LL | [NAN, _] => {},
14
14
| ^^^
@@ -17,7 +17,16 @@ LL | [NAN, _] => {},
17
17
= help: try using the `is_nan` method instead
18
18
19
19
error: cannot use NaN in patterns
20
- --> $DIR/issue-6804-nan-match.rs:21:9
20
+ --> $DIR/issue-6804-nan-match.rs:25:9
21
+ |
22
+ LL | C => {},
23
+ | ^
24
+ |
25
+ = note: NaNs compare inequal to everything, even themselves, so this pattern would never match
26
+ = help: try using the `is_nan` method instead
27
+
28
+ error: cannot use NaN in patterns
29
+ --> $DIR/issue-6804-nan-match.rs:31:9
21
30
|
22
31
LL | NAN..=1.0 => {},
23
32
| ^^^
@@ -26,13 +35,13 @@ LL | NAN..=1.0 => {},
26
35
= help: try using the `is_nan` method instead
27
36
28
37
error[E0030]: lower range bound must be less than or equal to upper
29
- --> $DIR/issue-6804-nan-match.rs:21 :9
38
+ --> $DIR/issue-6804-nan-match.rs:31 :9
30
39
|
31
40
LL | NAN..=1.0 => {},
32
41
| ^^^^^^^^^ lower bound larger than upper bound
33
42
34
43
error: cannot use NaN in patterns
35
- --> $DIR/issue-6804-nan-match.rs:23 :16
44
+ --> $DIR/issue-6804-nan-match.rs:33 :16
36
45
|
37
46
LL | -1.0..=NAN => {},
38
47
| ^^^
@@ -41,13 +50,13 @@ LL | -1.0..=NAN => {},
41
50
= help: try using the `is_nan` method instead
42
51
43
52
error[E0030]: lower range bound must be less than or equal to upper
44
- --> $DIR/issue-6804-nan-match.rs:23 :9
53
+ --> $DIR/issue-6804-nan-match.rs:33 :9
45
54
|
46
55
LL | -1.0..=NAN => {},
47
56
| ^^^^^^^^^^ lower bound larger than upper bound
48
57
49
58
error: cannot use NaN in patterns
50
- --> $DIR/issue-6804-nan-match.rs:25 :9
59
+ --> $DIR/issue-6804-nan-match.rs:35 :9
51
60
|
52
61
LL | NAN.. => {},
53
62
| ^^^
@@ -56,13 +65,13 @@ LL | NAN.. => {},
56
65
= help: try using the `is_nan` method instead
57
66
58
67
error[E0030]: lower range bound must be less than or equal to upper
59
- --> $DIR/issue-6804-nan-match.rs:25 :9
68
+ --> $DIR/issue-6804-nan-match.rs:35 :9
60
69
|
61
70
LL | NAN.. => {},
62
71
| ^^^^^ lower bound larger than upper bound
63
72
64
73
error: cannot use NaN in patterns
65
- --> $DIR/issue-6804-nan-match.rs:27 :11
74
+ --> $DIR/issue-6804-nan-match.rs:37 :11
66
75
|
67
76
LL | ..NAN => {},
68
77
| ^^^
@@ -71,12 +80,12 @@ LL | ..NAN => {},
71
80
= help: try using the `is_nan` method instead
72
81
73
82
error[E0579]: lower range bound must be less than upper
74
- --> $DIR/issue-6804-nan-match.rs:27 :9
83
+ --> $DIR/issue-6804-nan-match.rs:37 :9
75
84
|
76
85
LL | ..NAN => {},
77
86
| ^^^^^
78
87
79
- error: aborting due to 10 previous errors
88
+ error: aborting due to 11 previous errors
80
89
81
90
Some errors have detailed explanations: E0030, E0579.
82
91
For more information about an error, try `rustc --explain E0030`.
0 commit comments