Rollup merge of #116284 - RalfJung:no-nan-match, r=cjgillot

make matching on NaN a hard error, and remove the rest of illegal_floating_point_literal_pattern

These arms would never be hit anyway, so the pattern makes little sense. We have had a future-compat lint against float matches in general for a *long* time, so I hope we can get away with immediately making this a hard error.

This is part of implementing https://github.com/rust-lang/rfcs/pull/3535.

Closes https://github.com/rust-lang/rust/issues/41620 by removing the lint.

https://github.com/rust-lang/reference/pull/1456 updates the reference to match.
This commit is contained in:
Matthias Krüger 2024-02-05 11:07:26 +01:00 committed by GitHub
commit ed27148812
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 372 additions and 509 deletions

View file

@ -516,6 +516,10 @@ fn register_builtins(store: &mut LintStore) {
"converted into hard error, see PR #118649 \
<https://github.com/rust-lang/rust/pull/118649> for more information",
);
store.register_removed(
"illegal_floating_point_literal_pattern",
"no longer a warning, float patterns behave the same as `==`",
);
}
fn register_internals(store: &mut LintStore) {