about summary refs log tree commit diff
path: root/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.stderr
blob: 2066c53e73a6bf2caaefc2b1e26dc5f38ebfb6cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
  --> $DIR/cant-hide-behind-indirect-struct-param.rs:22:9
   |
LL | const WRAP_INDIRECT_PARAM: & &WrapParam<NoDerive> = & &WrapParam(NoDerive(0));
   | ------------------------------------------------- constant defined here
...
LL |         WRAP_INDIRECT_PARAM => { panic!("WRAP_INDIRECT_PARAM matched itself"); }
   |         ^^^^^^^^^^^^^^^^^^^
   |
   = note: the traits must be derived, manual `impl`s are not sufficient
   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details

error: aborting due to 1 previous error