@@ -45,7 +45,6 @@ declare_lint_pass! {
45
45
FUZZY_PROVENANCE_CASTS ,
46
46
HIDDEN_GLOB_REEXPORTS ,
47
47
ILL_FORMED_ATTRIBUTE_INPUT ,
48
- ILLEGAL_FLOATING_POINT_LITERAL_PATTERN ,
49
48
INCOMPLETE_INCLUDE ,
50
49
INDIRECT_STRUCTURAL_MATCH ,
51
50
INEFFECTIVE_UNSTABLE_TRAIT_IMPL ,
@@ -1873,55 +1872,6 @@ declare_lint! {
1873
1872
} ;
1874
1873
}
1875
1874
1876
- declare_lint ! {
1877
- /// The `illegal_floating_point_literal_pattern` lint detects
1878
- /// floating-point literals used in patterns.
1879
- ///
1880
- /// ### Example
1881
- ///
1882
- /// ```rust
1883
- /// let x = 42.0;
1884
- ///
1885
- /// match x {
1886
- /// 5.0 => {}
1887
- /// _ => {}
1888
- /// }
1889
- /// ```
1890
- ///
1891
- /// {{produces}}
1892
- ///
1893
- /// ### Explanation
1894
- ///
1895
- /// Previous versions of the compiler accepted floating-point literals in
1896
- /// patterns, but it was later determined this was a mistake. The
1897
- /// semantics of comparing floating-point values may not be clear in a
1898
- /// pattern when contrasted with "structural equality". Typically you can
1899
- /// work around this by using a [match guard], such as:
1900
- ///
1901
- /// ```rust
1902
- /// # let x = 42.0;
1903
- ///
1904
- /// match x {
1905
- /// y if y == 5.0 => {}
1906
- /// _ => {}
1907
- /// }
1908
- /// ```
1909
- ///
1910
- /// This is a [future-incompatible] lint to transition this to a hard
1911
- /// error in the future. See [issue #41620] for more details.
1912
- ///
1913
- /// [issue #41620]: https://github.com/rust-lang/rust/issues/41620
1914
- /// [match guard]: https://doc.rust-lang.org/reference/expressions/match-expr.html#match-guards
1915
- /// [future-incompatible]: ../index.md#future-incompatible-lints
1916
- pub ILLEGAL_FLOATING_POINT_LITERAL_PATTERN ,
1917
- Warn ,
1918
- "floating-point literals cannot be used in patterns" ,
1919
- @future_incompatible = FutureIncompatibleInfo {
1920
- reason: FutureIncompatibilityReason :: FutureReleaseErrorDontReportInDeps ,
1921
- reference: "issue #41620 <https://github.com/rust-lang/rust/issues/41620>" ,
1922
- } ;
1923
- }
1924
-
1925
1875
declare_lint ! {
1926
1876
/// The `unstable_name_collisions` lint detects that you have used a name
1927
1877
/// that the standard library plans to add in the future.
0 commit comments