rust/tests/ui/consts/const_in_pattern/cross-crate-fail.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
549 B
Plaintext
Raw Normal View History

error: to use a constant of type `CustomEq` in a pattern, `CustomEq` must be annotated with `#[derive(PartialEq, Eq)]`
--> $DIR/cross-crate-fail.rs:13:9
2020-04-07 15:01:41 -05:00
|
LL | consts::SOME => panic!(),
| ^^^^^^^^^^^^
2020-04-07 15:01:41 -05:00
error: to use a constant of type `CustomEq` in a pattern, `CustomEq` must be annotated with `#[derive(PartialEq, Eq)]`
--> $DIR/cross-crate-fail.rs:20:9
|
LL | <Defaulted as consts::AssocConst>::SOME => panic!(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
2020-04-07 15:01:41 -05:00