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 1010register_diagnostics ! {
1111E0001 : include_str!( "./error_codes/E0001.md" ) ,
1212E0002 : include_str!( "./error_codes/E0002.md" ) ,
13+ E0003 : include_str!( "./error_codes/E0003.md" ) ,
1314E0004 : include_str!( "./error_codes/E0004.md" ) ,
1415E0005 : include_str!( "./error_codes/E0005.md" ) ,
1516E0007 : 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