2017-10-06 15:30:23 -05:00
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/const.rs:14:9
|
2017-10-06 15:30:23 -05:00
|
|
|
|
|
2019-12-30 17:46:31 -06:00
|
|
|
LL | const FOO: Foo = Foo{bar: 5};
|
2022-02-13 09:27:59 -06:00
|
|
|
| -------------- constant defined here
|
2019-12-30 17:46:31 -06:00
|
|
|
...
|
2020-02-24 22:41:03 -06:00
|
|
|
LL | match &f {
|
|
|
|
| -- this expression has type `&Foo`
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | FOO => {},
|
2019-12-30 17:46:31 -06:00
|
|
|
| ^^^
|
|
|
|
| |
|
2023-01-02 20:00:33 -06:00
|
|
|
| expected `&Foo`, found `Foo`
|
2019-12-30 17:46:31 -06:00
|
|
|
| `FOO` is interpreted as a constant, not a new binding
|
|
|
|
| help: introduce a new binding instead: `other_foo`
|
2017-10-06 15:30:23 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about this error, try `rustc --explain E0308`.
|