rust/tests/ui/rfc-2005-default-binding-mode/const.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
556 B
Plaintext
Raw Normal View History

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