summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/usefulness/consts-opaque.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/pattern/usefulness/consts-opaque.stderr145
1 files changed, 87 insertions, 58 deletions
diff --git a/tests/ui/pattern/usefulness/consts-opaque.stderr b/tests/ui/pattern/usefulness/consts-opaque.stderr
index 35396751a..3f0b4a9f2 100644
--- a/tests/ui/pattern/usefulness/consts-opaque.stderr
+++ b/tests/ui/pattern/usefulness/consts-opaque.stderr
@@ -3,36 +3,18 @@ error: to use a constant of type `Foo` in a pattern, `Foo` must be annotated wit
|
LL | FOO => {}
| ^^^
-
-error: unreachable pattern
- --> $DIR/consts-opaque.rs:32:9
- |
-LL | FOO => {}
- | --- matches any value
-LL |
-LL | _ => {} // should not be emitting unreachable warning
- | ^ unreachable pattern
- |
-note: the lint level is defined here
- --> $DIR/consts-opaque.rs:6:9
|
-LL | #![deny(unreachable_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^
+ = note: the traits must be derived, manual `impl`s are not sufficient
+ = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
error: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq, Eq)]`
--> $DIR/consts-opaque.rs:37:9
|
LL | FOO_REF => {}
| ^^^^^^^
-
-error: unreachable pattern
- --> $DIR/consts-opaque.rs:39:9
|
-LL | FOO_REF => {}
- | ------- matches any value
-LL |
-LL | Foo(_) => {} // should not be emitting unreachable warning
- | ^^^^^^ unreachable pattern
+ = note: the traits must be derived, manual `impl`s are not sufficient
+ = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
warning: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq, Eq)]`
--> $DIR/consts-opaque.rs:45:9
@@ -42,6 +24,8 @@ LL | FOO_REF_REF => {}
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/62411>
+ = note: the traits must be derived, manual `impl`s are not sufficient
+ = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
= note: `#[warn(indirect_structural_match)]` on by default
error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
@@ -49,6 +33,87 @@ error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated wit
|
LL | BAR => {} // should not be emitting unreachable warning
| ^^^
+ |
+ = note: the traits must be derived, manual `impl`s are not sufficient
+ = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
+
+error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
+ --> $DIR/consts-opaque.rs:61:9
+ |
+LL | BAR => {}
+ | ^^^
+ |
+ = note: the traits must be derived, manual `impl`s are not sufficient
+ = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
+
+error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
+ --> $DIR/consts-opaque.rs:70:9
+ |
+LL | BAR => {}
+ | ^^^
+ |
+ = note: the traits must be derived, manual `impl`s are not sufficient
+ = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
+
+error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
+ --> $DIR/consts-opaque.rs:72:9
+ |
+LL | BAR => {} // should not be emitting unreachable warning
+ | ^^^
+ |
+ = note: the traits must be derived, manual `impl`s are not sufficient
+ = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
+
+error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
+ --> $DIR/consts-opaque.rs:80:9
+ |
+LL | BAZ => {}
+ | ^^^
+ |
+ = note: the traits must be derived, manual `impl`s are not sufficient
+ = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
+
+error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
+ --> $DIR/consts-opaque.rs:90:9
+ |
+LL | BAZ => {}
+ | ^^^
+ |
+ = note: the traits must be derived, manual `impl`s are not sufficient
+ = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
+
+error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
+ --> $DIR/consts-opaque.rs:97:9
+ |
+LL | BAZ => {}
+ | ^^^
+ |
+ = note: the traits must be derived, manual `impl`s are not sufficient
+ = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
+
+error: unreachable pattern
+ --> $DIR/consts-opaque.rs:32:9
+ |
+LL | FOO => {}
+ | --- matches any value
+LL |
+LL | _ => {} // should not be emitting unreachable warning
+ | ^ unreachable pattern
+ |
+note: the lint level is defined here
+ --> $DIR/consts-opaque.rs:6:9
+ |
+LL | #![deny(unreachable_patterns)]
+ | ^^^^^^^^^^^^^^^^^^^^
+
+error: unreachable pattern
+ --> $DIR/consts-opaque.rs:39:9
+ |
+LL | FOO_REF => {}
+ | ------- matches any value
+LL |
+LL | Foo(_) => {} // should not be emitting unreachable warning
+ | ^^^^^^ unreachable pattern
error: unreachable pattern
--> $DIR/consts-opaque.rs:53:9
@@ -67,12 +132,6 @@ LL | Bar => {}
LL | _ => {}
| ^ unreachable pattern
-error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
- --> $DIR/consts-opaque.rs:61:9
- |
-LL | BAR => {}
- | ^^^
-
error: unreachable pattern
--> $DIR/consts-opaque.rs:63:9
|
@@ -91,18 +150,6 @@ LL | BAR => {}
LL | _ => {}
| ^ unreachable pattern
-error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
- --> $DIR/consts-opaque.rs:70:9
- |
-LL | BAR => {}
- | ^^^
-
-error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
- --> $DIR/consts-opaque.rs:72:9
- |
-LL | BAR => {} // should not be emitting unreachable warning
- | ^^^
-
error: unreachable pattern
--> $DIR/consts-opaque.rs:72:9
|
@@ -121,12 +168,6 @@ LL | BAR => {}
LL | _ => {} // should not be emitting unreachable warning
| ^ unreachable pattern
-error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
- --> $DIR/consts-opaque.rs:80:9
- |
-LL | BAZ => {}
- | ^^^
-
error: unreachable pattern
--> $DIR/consts-opaque.rs:82:9
|
@@ -145,12 +186,6 @@ LL | BAZ => {}
LL | _ => {}
| ^ unreachable pattern
-error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
- --> $DIR/consts-opaque.rs:90:9
- |
-LL | BAZ => {}
- | ^^^
-
error: unreachable pattern
--> $DIR/consts-opaque.rs:92:9
|
@@ -160,12 +195,6 @@ LL |
LL | _ => {}
| ^ unreachable pattern
-error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
- --> $DIR/consts-opaque.rs:97:9
- |
-LL | BAZ => {}
- | ^^^
-
error: unreachable pattern
--> $DIR/consts-opaque.rs:99:9
|