about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-02-05 13:23:56 +0000
committerbors <bors@rust-lang.org>2024-02-05 13:23:56 +0000
commit86eaa892c098f79ff76fd24178caffa1eda86be2 (patch)
treeff35353ce11549191a14d4e7b1cda713edc1a0a3 /src
parent8c0b4f67c9b4bf477df38c16669fd576d46a2b3d (diff)
parentdc0b1f961a42e5200831cea9f34973320069620f (diff)
downloadrust-86eaa892c098f79ff76fd24178caffa1eda86be2.tar.gz
rust-86eaa892c098f79ff76fd24178caffa1eda86be2.zip
Auto merge of #120671 - matthiaskrgr:rollup-spjnpno, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #113833 (`std::error::Error` -> Trait Implementations: lifetimes consistency improvement)
 - #115386 (PartialEq, PartialOrd: update and synchronize handling of transitive chains)
 - #116284 (make matching on NaN a hard error, and remove the rest of illegal_floating_point_literal_pattern)
 - #118960 (Add LocalWaker and ContextBuilder types to core, and LocalWake trait to alloc.)
 - #120384 (Use `<T, U>` for array/slice equality `impl`s)
 - #120518 (riscv only supports split_debuginfo=off for now)
 - #120657 (Remove unused struct)
 - #120661 (target: default to the medium code model on LoongArch targets)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
-rw-r--r--src/tools/clippy/tests/ui/expect_tool_lint_rfc_2383.rs16
-rw-r--r--src/tools/clippy/tests/ui/expect_tool_lint_rfc_2383.stderr16
2 files changed, 12 insertions, 20 deletions
diff --git a/src/tools/clippy/tests/ui/expect_tool_lint_rfc_2383.rs b/src/tools/clippy/tests/ui/expect_tool_lint_rfc_2383.rs
index 3811421dc71..72097bfabd7 100644
--- a/src/tools/clippy/tests/ui/expect_tool_lint_rfc_2383.rs
+++ b/src/tools/clippy/tests/ui/expect_tool_lint_rfc_2383.rs
@@ -20,12 +20,8 @@ mod rustc_ok {
     pub fn rustc_lints() {
         let x = 42.0;
 
-        #[expect(illegal_floating_point_literal_pattern)]
-        match x {
-            5.0 => {}
-            6.0 => {}
-            _ => {}
-        }
+        #[expect(invalid_nan_comparisons)]
+        let _b = x == f32::NAN;
     }
 }
 
@@ -38,13 +34,9 @@ mod rustc_warn {
     pub fn rustc_lints() {
         let x = 42;
 
-        #[expect(illegal_floating_point_literal_pattern)]
+        #[expect(invalid_nan_comparisons)]
         //~^ ERROR: this lint expectation is unfulfilled
-        match x {
-            5 => {}
-            6 => {}
-            _ => {}
-        }
+        let _b = x == 5;
     }
 }
 
diff --git a/src/tools/clippy/tests/ui/expect_tool_lint_rfc_2383.stderr b/src/tools/clippy/tests/ui/expect_tool_lint_rfc_2383.stderr
index 3f8d0b72436..2a418d84566 100644
--- a/src/tools/clippy/tests/ui/expect_tool_lint_rfc_2383.stderr
+++ b/src/tools/clippy/tests/ui/expect_tool_lint_rfc_2383.stderr
@@ -1,5 +1,5 @@
 error: this lint expectation is unfulfilled
-  --> $DIR/expect_tool_lint_rfc_2383.rs:35:14
+  --> $DIR/expect_tool_lint_rfc_2383.rs:31:14
    |
 LL |     #[expect(dead_code)]
    |              ^^^^^^^^^
@@ -8,31 +8,31 @@ LL |     #[expect(dead_code)]
    = help: to override `-D warnings` add `#[allow(unfulfilled_lint_expectations)]`
 
 error: this lint expectation is unfulfilled
-  --> $DIR/expect_tool_lint_rfc_2383.rs:41:18
+  --> $DIR/expect_tool_lint_rfc_2383.rs:37:18
    |
-LL |         #[expect(illegal_floating_point_literal_pattern)]
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         #[expect(invalid_nan_comparisons)]
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^
 
 error: this lint expectation is unfulfilled
-  --> $DIR/expect_tool_lint_rfc_2383.rs:116:14
+  --> $DIR/expect_tool_lint_rfc_2383.rs:108:14
    |
 LL |     #[expect(clippy::almost_swapped)]
    |              ^^^^^^^^^^^^^^^^^^^^^^
 
 error: this lint expectation is unfulfilled
-  --> $DIR/expect_tool_lint_rfc_2383.rs:124:14
+  --> $DIR/expect_tool_lint_rfc_2383.rs:116:14
    |
 LL |     #[expect(clippy::bytes_nth)]
    |              ^^^^^^^^^^^^^^^^^
 
 error: this lint expectation is unfulfilled
-  --> $DIR/expect_tool_lint_rfc_2383.rs:130:14
+  --> $DIR/expect_tool_lint_rfc_2383.rs:122:14
    |
 LL |     #[expect(clippy::if_same_then_else)]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: this lint expectation is unfulfilled
-  --> $DIR/expect_tool_lint_rfc_2383.rs:136:14
+  --> $DIR/expect_tool_lint_rfc_2383.rs:128:14
    |
 LL |     #[expect(clippy::overly_complex_bool_expr)]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^