rust/tests/ui/pattern/issue-72565.stderr
Esteban Küber a6040bc230 Specify type kind of constant that can't be used in patterns
```
error: trait object `dyn Send` cannot be used in patterns
  --> $DIR/issue-70972-dyn-trait.rs:6:9
   |
LL | const F: &'static dyn Send = &7u32;
   | -------------------------- constant defined here
...
LL |         F => panic!(),
   |         ^ trait object can't be used in patterns
```
2024-12-04 20:29:36 +00:00

12 lines
346 B
Plaintext

error: trait object `dyn PartialEq<u32>` cannot be used in patterns
--> $DIR/issue-72565.rs:6:9
|
LL | const F: &'static dyn PartialEq<u32> = &7u32;
| ------------------------------------ constant defined here
...
LL | F => panic!(),
| ^ trait object can't be used in patterns
error: aborting due to 1 previous error