2020-03-16 23:01:05 -05:00
|
|
|
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
|
|
|
|
--> $DIR/reject_non_structural.rs:40:36
|
|
|
|
|
|
|
|
|
LL | match Derive::Some(NoDerive) { ENUM => dbg!(ENUM), _ => panic!("whoops"), };
|
|
|
|
| ^^^^
|
2023-03-27 09:14:08 -05:00
|
|
|
|
|
|
|
|
= 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
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
|
2023-03-27 09:14:08 -05:00
|
|
|
--> $DIR/reject_non_structural.rs:46:28
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
|
LL | match Some(NoDerive) { FIELD => dbg!(FIELD), _ => panic!("whoops"), };
|
|
|
|
| ^^^^^
|
2023-03-27 09:14:08 -05:00
|
|
|
|
|
|
|
|
= 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
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
|
2023-03-27 09:14:08 -05:00
|
|
|
--> $DIR/reject_non_structural.rs:53:27
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
|
LL | match Some(NoDerive) {INDIRECT => dbg!(INDIRECT), _ => panic!("whoops"), };
|
|
|
|
| ^^^^^^^^
|
2023-03-27 09:14:08 -05:00
|
|
|
|
|
|
|
|
= 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
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
|
2023-03-27 09:14:08 -05:00
|
|
|
--> $DIR/reject_non_structural.rs:59:36
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
|
LL | match (None, Some(NoDerive)) { TUPLE => dbg!(TUPLE), _ => panic!("whoops"), };
|
|
|
|
| ^^^^^
|
2023-03-27 09:14:08 -05:00
|
|
|
|
|
|
|
|
= 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
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
|
2023-03-27 09:14:08 -05:00
|
|
|
--> $DIR/reject_non_structural.rs:65:28
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
2020-04-28 16:49:35 -05:00
|
|
|
LL | match Some(NoDerive) { TYPE_ASCRIPTION => dbg!(TYPE_ASCRIPTION), _ => panic!("whoops"), };
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2023-03-27 09:14:08 -05:00
|
|
|
|
|
|
|
|
= 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
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
|
2023-03-27 09:14:08 -05:00
|
|
|
--> $DIR/reject_non_structural.rs:71:36
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
|
LL | match [None, Some(NoDerive)] { ARRAY => dbg!(ARRAY), _ => panic!("whoops"), };
|
|
|
|
| ^^^^^
|
2023-03-27 09:14:08 -05:00
|
|
|
|
|
|
|
|
= 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
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
|
2023-03-27 09:14:08 -05:00
|
|
|
--> $DIR/reject_non_structural.rs:77:33
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
|
LL | match [Some(NoDerive); 2] { REPEAT => dbg!(REPEAT), _ => panic!("whoops"), };
|
|
|
|
| ^^^^^^
|
2023-03-27 09:14:08 -05:00
|
|
|
|
|
|
|
|
= 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
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
|
2023-03-27 09:14:08 -05:00
|
|
|
--> $DIR/reject_non_structural.rs:77:33
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
|
LL | match [Some(NoDerive); 2] { REPEAT => dbg!(REPEAT), _ => panic!("whoops"), };
|
|
|
|
| ^^^^^^
|
2023-03-27 09:14:08 -05:00
|
|
|
|
|
|
|
|
= 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
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
|
2023-03-27 09:14:08 -05:00
|
|
|
--> $DIR/reject_non_structural.rs:87:28
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
|
LL | match Some(NoDerive) { NoDerive::ASSOC => dbg!(NoDerive::ASSOC), _ => panic!("whoops"), };
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2023-03-27 09:14:08 -05:00
|
|
|
|
|
|
|
|
= 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
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
|
2023-03-27 09:14:08 -05:00
|
|
|
--> $DIR/reject_non_structural.rs:93:28
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
|
LL | match Some(NoDerive) { BLOCK => dbg!(BLOCK), _ => panic!("whoops"), };
|
|
|
|
| ^^^^^
|
2023-03-27 09:14:08 -05:00
|
|
|
|
|
|
|
|
= 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
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
warning: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
|
2023-03-27 09:14:08 -05:00
|
|
|
--> $DIR/reject_non_structural.rs:99:29
|
2020-03-16 23:01:05 -05:00
|
|
|
|
|
|
|
|
LL | match &Some(NoDerive) { ADDR_OF => dbg!(ADDR_OF), _ => panic!("whoops"), };
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
2022-09-18 10:55:36 -05:00
|
|
|
= 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>
|
2023-03-27 09:14:08 -05:00
|
|
|
= 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
|
2020-03-16 23:01:05 -05:00
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/reject_non_structural.rs:12:9
|
|
|
|
|
|
|
|
|
LL | #![warn(indirect_structural_match)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2020-09-23 10:03:31 -05:00
|
|
|
error: aborting due to 10 previous errors; 1 warning emitted
|
2020-03-16 23:01:05 -05:00
|
|
|
|