summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/usefulness/consts-opaque.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/pattern/usefulness/consts-opaque.stderr')
-rw-r--r--tests/ui/pattern/usefulness/consts-opaque.stderr184
1 files changed, 67 insertions, 117 deletions
diff --git a/tests/ui/pattern/usefulness/consts-opaque.stderr b/tests/ui/pattern/usefulness/consts-opaque.stderr
index e01b06ccc..09f72ba92 100644
--- a/tests/ui/pattern/usefulness/consts-opaque.stderr
+++ b/tests/ui/pattern/usefulness/consts-opaque.stderr
@@ -8,7 +8,7 @@ LL | FOO => {}
= 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:38:9
+ --> $DIR/consts-opaque.rs:37:9
|
LL | FOO_REF => {}
| ^^^^^^^
@@ -17,7 +17,7 @@ LL | FOO_REF => {}
= 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:46:9
+ --> $DIR/consts-opaque.rs:44:9
|
LL | FOO_REF_REF => {}
| ^^^^^^^^^^^
@@ -29,16 +29,16 @@ LL | FOO_REF_REF => {}
= 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)]`
- --> $DIR/consts-opaque.rs:54:9
+ --> $DIR/consts-opaque.rs:52:9
|
-LL | BAR => {} // should not be emitting unreachable warning
+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:62:9
+ --> $DIR/consts-opaque.rs:58:9
|
LL | BAR => {}
| ^^^
@@ -47,7 +47,7 @@ LL | BAR => {}
= 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:71:9
+ --> $DIR/consts-opaque.rs:65:9
|
LL | BAR => {}
| ^^^
@@ -56,16 +56,16 @@ LL | BAR => {}
= 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:73:9
+ --> $DIR/consts-opaque.rs:67:9
|
-LL | BAR => {} // should not be emitting unreachable warning
+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 `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
- --> $DIR/consts-opaque.rs:81:9
+ --> $DIR/consts-opaque.rs:73:9
|
LL | BAZ => {}
| ^^^
@@ -74,7 +74,7 @@ LL | BAZ => {}
= 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:91:9
+ --> $DIR/consts-opaque.rs:81:9
|
LL | BAZ => {}
| ^^^
@@ -83,7 +83,7 @@ LL | BAZ => {}
= 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:98:9
+ --> $DIR/consts-opaque.rs:87:9
|
LL | BAZ => {}
| ^^^
@@ -91,146 +91,96 @@ 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:33:9
- |
-LL | FOO => {}
- | --- matches any value
-LL |
-LL | _ => {} // should not be emitting unreachable warning
- | ^ unreachable pattern
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+ --> $DIR/consts-opaque.rs:98:9
|
-note: the lint level is defined here
- --> $DIR/consts-opaque.rs:6:9
+LL | QUUX => {}
+ | ^^^^
|
-LL | #![deny(unreachable_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^
+ = 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/70861>
+ = note: `#[warn(pointer_structural_match)]` on by default
-error: unreachable pattern
- --> $DIR/consts-opaque.rs:40:9
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+ --> $DIR/consts-opaque.rs:100: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:54:9
+LL | QUUX => {}
+ | ^^^^
|
-LL | Bar => {}
- | --- matches any value
-LL | BAR => {} // should not be emitting unreachable warning
- | ^^^ unreachable pattern
+ = 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/70861>
-error: unreachable pattern
- --> $DIR/consts-opaque.rs:57:9
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+ --> $DIR/consts-opaque.rs:110:9
|
-LL | Bar => {}
- | --- matches any value
-...
-LL | _ => {}
- | ^ unreachable pattern
-
-error: unreachable pattern
- --> $DIR/consts-opaque.rs:64:9
+LL | WRAPQUUX => {}
+ | ^^^^^^^^
|
-LL | BAR => {}
- | --- matches any value
-LL |
-LL | Bar => {} // should not be emitting unreachable warning
- | ^^^ unreachable pattern
+ = 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/70861>
-error: unreachable pattern
- --> $DIR/consts-opaque.rs:66:9
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+ --> $DIR/consts-opaque.rs:112:9
|
-LL | BAR => {}
- | --- matches any value
-...
-LL | _ => {}
- | ^ unreachable pattern
-
-error: unreachable pattern
- --> $DIR/consts-opaque.rs:73:9
+LL | WRAPQUUX => {}
+ | ^^^^^^^^
|
-LL | BAR => {}
- | --- matches any value
-LL |
-LL | BAR => {} // should not be emitting unreachable warning
- | ^^^ unreachable pattern
+ = 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/70861>
-error: unreachable pattern
- --> $DIR/consts-opaque.rs:76:9
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+ --> $DIR/consts-opaque.rs:119:9
|
-LL | BAR => {}
- | --- matches any value
-...
-LL | _ => {} // should not be emitting unreachable warning
- | ^ unreachable pattern
-
-error: unreachable pattern
- --> $DIR/consts-opaque.rs:83:9
+LL | WRAPQUUX => {}
+ | ^^^^^^^^
|
-LL | BAZ => {}
- | --- matches any value
-LL |
-LL | Baz::Baz1 => {} // should not be emitting unreachable warning
- | ^^^^^^^^^ unreachable pattern
+ = 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/70861>
-error: unreachable pattern
- --> $DIR/consts-opaque.rs:85:9
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+ --> $DIR/consts-opaque.rs:129:9
|
-LL | BAZ => {}
- | --- matches any value
-...
-LL | _ => {}
- | ^ unreachable pattern
-
-error: unreachable pattern
- --> $DIR/consts-opaque.rs:93:9
+LL | WRAPQUUX => {}
+ | ^^^^^^^^
|
-LL | BAZ => {}
- | --- matches any value
-LL |
-LL | _ => {}
- | ^ unreachable pattern
+ = 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/70861>
-error: unreachable pattern
- --> $DIR/consts-opaque.rs:100:9
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+ --> $DIR/consts-opaque.rs:141:9
|
-LL | BAZ => {}
- | --- matches any value
-LL |
-LL | Baz::Baz2 => {} // should not be emitting unreachable warning
- | ^^^^^^^^^ unreachable pattern
+LL | WHOKNOWSQUUX => {}
+ | ^^^^^^^^^^^^
+ |
+ = 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/70861>
-error: unreachable pattern
- --> $DIR/consts-opaque.rs:102:9
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+ --> $DIR/consts-opaque.rs:144:9
|
-LL | BAZ => {}
- | --- matches any value
-...
-LL | _ => {} // should not be emitting unreachable warning
- | ^ unreachable pattern
+LL | WHOKNOWSQUUX => {}
+ | ^^^^^^^^^^^^
+ |
+ = 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/70861>
error[E0004]: non-exhaustive patterns: `Wrap(_)` not covered
- --> $DIR/consts-opaque.rs:135:11
+ --> $DIR/consts-opaque.rs:127:11
|
LL | match WRAPQUUX {
| ^^^^^^^^ pattern `Wrap(_)` not covered
|
note: `Wrap<fn(usize, usize) -> usize>` defined here
- --> $DIR/consts-opaque.rs:117:12
+ --> $DIR/consts-opaque.rs:106:12
|
LL | struct Wrap<T>(T);
| ^^^^
= note: the matched value is of type `Wrap<fn(usize, usize) -> usize>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
-LL ~ WRAPQUUX => {},
-LL + Wrap(_) => todo!()
- |
+LL | WRAPQUUX => {}, Wrap(_) => todo!()
+ | ++++++++++++++++++++
-error: aborting due to 23 previous errors; 1 warning emitted
+error: aborting due to 10 previous errors; 9 warnings emitted
For more information about this error, try `rustc --explain E0004`.