File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 10
10
register_diagnostics ! {
11
11
E0001 : include_str!( "./error_codes/E0001.md" ) ,
12
12
E0002 : include_str!( "./error_codes/E0002.md" ) ,
13
+ E0003 : include_str!( "./error_codes/E0003.md" ) ,
13
14
E0004 : include_str!( "./error_codes/E0004.md" ) ,
14
15
E0005 : include_str!( "./error_codes/E0005.md" ) ,
15
16
E0007 : include_str!( "./error_codes/E0007.md" ) ,
Original file line number Diff line number Diff line change
1
+ #### Note: this error code is no longer emitted by the compiler.
2
+
3
+ Not-a-Number (NaN) values cannot be compared for equality and hence can never
4
+ match the input to a match expression. To match against NaN values, you should
5
+ instead use the ` is_nan() ` method in a guard, like so:
6
+
7
+ ```
8
+ let number = 0f64;
9
+
10
+ match number {
11
+ // ...
12
+ x if x.is_nan() => { /* ... */ }
13
+ x => { /* ... */ }
14
+ }
15
+ ```
You can’t perform that action at this time.
0 commit comments