You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to use a constant of type `{$non_sm_ty}` in a pattern, the constant's initializer must be trivial or `{$non_sm_ty}` must be annotated with `#[derive(PartialEq, Eq)]`
333
333
334
+
mir_build_type_not_structural_tip = the traits must be derived, manual `impl`s are not sufficient
335
+
336
+
mir_build_type_not_structural_more_info = see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
337
+
334
338
mir_build_overlapping_range_endpoints = multiple patterns overlap on their endpoints
335
339
.range = ... with this range
336
340
.note = you likely meant to write mutually exclusive ranges
Copy file name to clipboardexpand all lines: tests/ui/consts/const_in_pattern/warn_corner_cases.stderr
+6
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ LL | match None { Some(_) => panic!("whoops"), INDEX => dbg!(INDEX), };
6
6
|
7
7
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8
8
= note: for more information, see issue #73448 <https://github.com/rust-lang/rust/issues/73448>
9
+
= note: the traits must be derived, manual `impl`s are not sufficient
10
+
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
9
11
= note: `#[warn(nontrivial_structural_match)]` on by default
10
12
11
13
warning: to use a constant of type `NoDerive` in a pattern, the constant's initializer must be trivial or `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
18
20
= note: for more information, see issue #73448 <https://github.com/rust-lang/rust/issues/73448>
21
+
= note: the traits must be derived, manual `impl`s are not sufficient
22
+
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
19
23
20
24
warning: to use a constant of type `NoDerive` in a pattern, the constant's initializer must be trivial or `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
0 commit comments