rustc/tests/ui/pattern/usefulness/consts-opaque.stderr
2025-02-17 11:14:05 +01:00

180 lines
5.8 KiB
Plaintext

error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
--> $DIR/consts-opaque.rs:96:9
|
LL | const QUUX: Quux = quux;
| ---------------- constant defined here
...
LL | QUUX => {}
| ^^^^ can't be used in patterns
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
--> $DIR/consts-opaque.rs:97:9
|
LL | const QUUX: Quux = quux;
| ---------------- constant defined here
...
LL | QUUX => {}
| ^^^^ can't be used in patterns
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
--> $DIR/consts-opaque.rs:106:9
|
LL | const WRAPQUUX: Wrap<Quux> = Wrap(quux);
| -------------------------- constant defined here
...
LL | WRAPQUUX => {}
| ^^^^^^^^ can't be used in patterns
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
--> $DIR/consts-opaque.rs:107:9
|
LL | const WRAPQUUX: Wrap<Quux> = Wrap(quux);
| -------------------------- constant defined here
...
LL | WRAPQUUX => {}
| ^^^^^^^^ can't be used in patterns
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
--> $DIR/consts-opaque.rs:113:9
|
LL | const WRAPQUUX: Wrap<Quux> = Wrap(quux);
| -------------------------- constant defined here
...
LL | WRAPQUUX => {}
| ^^^^^^^^ can't be used in patterns
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
--> $DIR/consts-opaque.rs:121:9
|
LL | const WRAPQUUX: Wrap<Quux> = Wrap(quux);
| -------------------------- constant defined here
...
LL | WRAPQUUX => {}
| ^^^^^^^^ can't be used in patterns
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
--> $DIR/consts-opaque.rs:132:9
|
LL | const WHOKNOWSQUUX: WhoKnows<Quux> = WhoKnows::Yay(quux);
| ---------------------------------- constant defined here
...
LL | WHOKNOWSQUUX => {}
| ^^^^^^^^^^^^ can't be used in patterns
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
--> $DIR/consts-opaque.rs:134:9
|
LL | const WHOKNOWSQUUX: WhoKnows<Quux> = WhoKnows::Yay(quux);
| ---------------------------------- constant defined here
...
LL | WHOKNOWSQUUX => {}
| ^^^^^^^^^^^^ can't be used in patterns
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
error: unreachable pattern
--> $DIR/consts-opaque.rs:48:9
|
LL | Bar => {}
| --- matches any value
LL | BAR => {}
| ^^^ no value can reach this
|
note: the lint level is defined here
--> $DIR/consts-opaque.rs:6:9
|
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
error: unreachable pattern
--> $DIR/consts-opaque.rs:50:9
|
LL | Bar => {}
| --- matches any value
...
LL | _ => {}
| ^ no value can reach this
error: unreachable pattern
--> $DIR/consts-opaque.rs:56:9
|
LL | BAR => {}
| --- matches any value
LL | Bar => {}
| ^^^ no value can reach this
error: unreachable pattern
--> $DIR/consts-opaque.rs:58:9
|
LL | BAR => {}
| --- matches any value
...
LL | _ => {}
| ^ no value can reach this
error: unreachable pattern
--> $DIR/consts-opaque.rs:64:9
|
LL | BAR => {}
| --- matches any value
LL | BAR => {} // should not be emitting unreachable warning
| ^^^ no value can reach this
error: unreachable pattern
--> $DIR/consts-opaque.rs:66:9
|
LL | BAR => {}
| --- matches any value
...
LL | _ => {} // should not be emitting unreachable warning
| ^ no value can reach this
error: unreachable pattern
--> $DIR/consts-opaque.rs:72:9
|
LL | BAZ => {}
| --- matches all the relevant values
LL | Baz::Baz1 => {} // should not be emitting unreachable warning
| ^^^^^^^^^ no value can reach this
error: unreachable pattern
--> $DIR/consts-opaque.rs:79:9
|
LL | Baz::Baz1 => {}
| --------- matches all the relevant values
LL | BAZ => {}
| ^^^ no value can reach this
error: unreachable pattern
--> $DIR/consts-opaque.rs:87:9
|
LL | _ => {} // should not be emitting unreachable warning
| ^ no value can reach this
|
note: multiple earlier patterns match some of the same values
--> $DIR/consts-opaque.rs:87:9
|
LL | BAZ => {}
| --- matches some of the same values
LL | Baz::Baz2 => {}
| --------- matches some of the same values
LL | _ => {} // should not be emitting unreachable warning
| ^ collectively making this unreachable
error: aborting due to 17 previous errors