about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/consts/const_in_pattern/issue-65466.stderr4
-rw-r--r--tests/ui/consts/const_in_pattern/reject_non_partial_eq.stderr4
-rw-r--r--tests/ui/match/issue-72896-non-partial-eq-const.stderr4
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.stderr4
4 files changed, 12 insertions, 4 deletions
diff --git a/tests/ui/consts/const_in_pattern/issue-65466.stderr b/tests/ui/consts/const_in_pattern/issue-65466.stderr
index bd9748b5dda..511a38bbc00 100644
--- a/tests/ui/consts/const_in_pattern/issue-65466.stderr
+++ b/tests/ui/consts/const_in_pattern/issue-65466.stderr
@@ -1,13 +1,15 @@
 error: constant of non-structural type `&[O<B>]` in a pattern
   --> $DIR/issue-65466.rs:14:9
    |
+LL | struct B;
+   | -------- must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+LL |
 LL | const C: &[O<B>] = &[O::None];
    | ---------------- constant defined here
 ...
 LL |         C => (),
    |         ^ constant of non-structural type
    |
-   = note: `&[O<B>]` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
    = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const_in_pattern/reject_non_partial_eq.stderr b/tests/ui/consts/const_in_pattern/reject_non_partial_eq.stderr
index 0ef5286e689..43894f00886 100644
--- a/tests/ui/consts/const_in_pattern/reject_non_partial_eq.stderr
+++ b/tests/ui/consts/const_in_pattern/reject_non_partial_eq.stderr
@@ -1,13 +1,15 @@
 error: constant of non-structural type `Option<NoPartialEq>` in a pattern
   --> $DIR/reject_non_partial_eq.rs:28:9
    |
+LL | struct NoPartialEq(u32);
+   | ------------------ must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
 LL | const NO_PARTIAL_EQ_NONE: Option<NoPartialEq> = None;
    | --------------------------------------------- constant defined here
 ...
 LL |         NO_PARTIAL_EQ_NONE => println!("NO_PARTIAL_EQ_NONE"),
    |         ^^^^^^^^^^^^^^^^^^ constant of non-structural type
    |
-   = note: `Option<NoPartialEq>` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
    = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/match/issue-72896-non-partial-eq-const.stderr b/tests/ui/match/issue-72896-non-partial-eq-const.stderr
index 4287fbc188d..1f82d3e822a 100644
--- a/tests/ui/match/issue-72896-non-partial-eq-const.stderr
+++ b/tests/ui/match/issue-72896-non-partial-eq-const.stderr
@@ -1,13 +1,15 @@
 error: constant of non-structural type `EnumSet<Enum8>` in a pattern
   --> $DIR/issue-72896-non-partial-eq-const.rs:19:9
    |
+LL | enum Enum8 { }
+   | ---------- must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+...
 LL | const CONST_SET: EnumSet<Enum8> = EnumSet { __enumset_underlying: 3 };
    | ------------------------------- constant defined here
 ...
 LL |         CONST_SET => { /* ok */ }
    |         ^^^^^^^^^ constant of non-structural type
    |
-   = note: `EnumSet<Enum8>` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
    = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.stderr
index 4f83ca02c28..7d3b37686b8 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.stderr
@@ -1,13 +1,15 @@
 error: constant of non-structural type `&[B]` in a pattern
   --> $DIR/issue-61188-match-slice-forbidden-without-eq.rs:15:9
    |
+LL | struct B(i32);
+   | -------- must be annotated with `#[derive(PartialEq)]` to be usable in patterns
+LL |
 LL | const A: &[B] = &[];
    | ------------- constant defined here
 ...
 LL |         A => (),
    |         ^ constant of non-structural type
    |
-   = note: `&[B]` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
    = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
 
 error: aborting due to 1 previous error