about summary refs log tree commit diff
path: root/tests/ui/consts/const_in_pattern/issue-44333.stderr
blob: 61b45377c7610b9ddcba4311d60fb156d2ee80dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
  --> $DIR/issue-44333.rs:15:9
   |
LL | const FOO: Func = foo;
   | --------------- constant defined here
...
LL |         FOO => println!("foo"),
   |         ^^^ can't be used in patterns
   |
   = note: see https://github.com/rust-lang/rust/issues/70861 for details

error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
  --> $DIR/issue-44333.rs:16:9
   |
LL | const BAR: Func = bar;
   | --------------- constant defined here
...
LL |         BAR => println!("bar"),
   |         ^^^ can't be used in patterns
   |
   = note: see https://github.com/rust-lang/rust/issues/70861 for details

error: aborting due to 2 previous errors