about summary refs log tree commit diff
path: root/tests/ui/pattern
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 /tests/ui/pattern
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 'tests/ui/pattern')
-rw-r--r--tests/ui/pattern/usefulness/floats.rs1
-rw-r--r--tests/ui/pattern/usefulness/floats.stderr18
-rw-r--r--tests/ui/pattern/usefulness/non-exhaustive-match.rs2
-rw-r--r--tests/ui/pattern/usefulness/non-exhaustive-match.stderr20
4 files changed, 19 insertions, 22 deletions
diff --git a/tests/ui/pattern/usefulness/floats.rs b/tests/ui/pattern/usefulness/floats.rs
index 2616dfadb85..63ce26adab2 100644
--- a/tests/ui/pattern/usefulness/floats.rs
+++ b/tests/ui/pattern/usefulness/floats.rs
@@ -1,5 +1,4 @@
 #![feature(exclusive_range_pattern)]
-#![allow(illegal_floating_point_literal_pattern)]
 #![deny(unreachable_patterns)]
 
 fn main() {
diff --git a/tests/ui/pattern/usefulness/floats.stderr b/tests/ui/pattern/usefulness/floats.stderr
index f5041911824..d99f05f5284 100644
--- a/tests/ui/pattern/usefulness/floats.stderr
+++ b/tests/ui/pattern/usefulness/floats.stderr
@@ -1,5 +1,5 @@
 error[E0004]: non-exhaustive patterns: `_` not covered
-  --> $DIR/floats.rs:11:11
+  --> $DIR/floats.rs:10:11
    |
 LL |     match 0.0 {
    |           ^^^ pattern `_` not covered
@@ -12,49 +12,49 @@ LL +         _ => todo!()
    |
 
 error: unreachable pattern
-  --> $DIR/floats.rs:19:9
+  --> $DIR/floats.rs:18:9
    |
 LL |         0.01f64 => {}
    |         ^^^^^^^
    |
 note: the lint level is defined here
-  --> $DIR/floats.rs:3:9
+  --> $DIR/floats.rs:2:9
    |
 LL | #![deny(unreachable_patterns)]
    |         ^^^^^^^^^^^^^^^^^^^^
 
 error: unreachable pattern
-  --> $DIR/floats.rs:20:9
+  --> $DIR/floats.rs:19:9
    |
 LL |         0.02f64 => {}
    |         ^^^^^^^
 
 error: unreachable pattern
-  --> $DIR/floats.rs:21:9
+  --> $DIR/floats.rs:20:9
    |
 LL |         6.5f64 => {}
    |         ^^^^^^
 
 error: unreachable pattern
-  --> $DIR/floats.rs:23:9
+  --> $DIR/floats.rs:22:9
    |
 LL |         1.0f64..=4.0f64 => {}
    |         ^^^^^^^^^^^^^^^
 
 error: unreachable pattern
-  --> $DIR/floats.rs:35:9
+  --> $DIR/floats.rs:34:9
    |
 LL |         0.01f32 => {}
    |         ^^^^^^^
 
 error: unreachable pattern
-  --> $DIR/floats.rs:36:9
+  --> $DIR/floats.rs:35:9
    |
 LL |         0.02f32 => {}
    |         ^^^^^^^
 
 error: unreachable pattern
-  --> $DIR/floats.rs:37:9
+  --> $DIR/floats.rs:36:9
    |
 LL |         6.5f32 => {}
    |         ^^^^^^
diff --git a/tests/ui/pattern/usefulness/non-exhaustive-match.rs b/tests/ui/pattern/usefulness/non-exhaustive-match.rs
index 1cb58b8cebe..44acd397f8d 100644
--- a/tests/ui/pattern/usefulness/non-exhaustive-match.rs
+++ b/tests/ui/pattern/usefulness/non-exhaustive-match.rs
@@ -1,5 +1,3 @@
-#![allow(illegal_floating_point_literal_pattern)]
-
 enum T { A, B }
 
 fn main() {
diff --git a/tests/ui/pattern/usefulness/non-exhaustive-match.stderr b/tests/ui/pattern/usefulness/non-exhaustive-match.stderr
index 4bebd3cbbef..61ed0eb4fc4 100644
--- a/tests/ui/pattern/usefulness/non-exhaustive-match.stderr
+++ b/tests/ui/pattern/usefulness/non-exhaustive-match.stderr
@@ -1,11 +1,11 @@
 error[E0004]: non-exhaustive patterns: `T::A` not covered
-  --> $DIR/non-exhaustive-match.rs:7:11
+  --> $DIR/non-exhaustive-match.rs:5:11
    |
 LL |     match x { T::B => { } }
    |           ^ pattern `T::A` not covered
    |
 note: `T` defined here
-  --> $DIR/non-exhaustive-match.rs:3:6
+  --> $DIR/non-exhaustive-match.rs:1:6
    |
 LL | enum T { A, B }
    |      ^   - not covered
@@ -16,7 +16,7 @@ LL |     match x { T::B => { }, T::A => todo!() }
    |                          +++++++++++++++++
 
 error[E0004]: non-exhaustive patterns: `false` not covered
-  --> $DIR/non-exhaustive-match.rs:8:11
+  --> $DIR/non-exhaustive-match.rs:6:11
    |
 LL |     match true {
    |           ^^^^ pattern `false` not covered
@@ -29,7 +29,7 @@ LL +       false => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `Some(_)` not covered
-  --> $DIR/non-exhaustive-match.rs:11:11
+  --> $DIR/non-exhaustive-match.rs:9:11
    |
 LL |     match Some(10) {
    |           ^^^^^^^^ pattern `Some(_)` not covered
@@ -47,7 +47,7 @@ LL +       Some(_) => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `(_, _, i32::MIN..=3_i32)` and `(_, _, 5_i32..=i32::MAX)` not covered
-  --> $DIR/non-exhaustive-match.rs:14:11
+  --> $DIR/non-exhaustive-match.rs:12:11
    |
 LL |     match (2, 3, 4) {
    |           ^^^^^^^^^ patterns `(_, _, i32::MIN..=3_i32)` and `(_, _, 5_i32..=i32::MAX)` not covered
@@ -60,7 +60,7 @@ LL +       (_, _, i32::MIN..=3_i32) | (_, _, 5_i32..=i32::MAX) => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `(T::A, T::A)` and `(T::B, T::B)` not covered
-  --> $DIR/non-exhaustive-match.rs:18:11
+  --> $DIR/non-exhaustive-match.rs:16:11
    |
 LL |     match (T::A, T::A) {
    |           ^^^^^^^^^^^^ patterns `(T::A, T::A)` and `(T::B, T::B)` not covered
@@ -73,13 +73,13 @@ LL +       (T::A, T::A) | (T::B, T::B) => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `T::B` not covered
-  --> $DIR/non-exhaustive-match.rs:22:11
+  --> $DIR/non-exhaustive-match.rs:20:11
    |
 LL |     match T::A {
    |           ^^^^ pattern `T::B` not covered
    |
 note: `T` defined here
-  --> $DIR/non-exhaustive-match.rs:3:6
+  --> $DIR/non-exhaustive-match.rs:1:6
    |
 LL | enum T { A, B }
    |      ^      - not covered
@@ -91,7 +91,7 @@ LL +       T::B => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `[]` not covered
-  --> $DIR/non-exhaustive-match.rs:33:11
+  --> $DIR/non-exhaustive-match.rs:31:11
    |
 LL |     match *vec {
    |           ^^^^ pattern `[]` not covered
@@ -104,7 +104,7 @@ LL +         [] => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `[_, _, _, _, ..]` not covered
-  --> $DIR/non-exhaustive-match.rs:46:11
+  --> $DIR/non-exhaustive-match.rs:44:11
    |
 LL |     match *vec {
    |           ^^^^ pattern `[_, _, _, _, ..]` not covered