]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2005-default-binding-mode/const.stderr
Auto merge of #101768 - sunfishcode:sunfishcode/wasi-stdio-lock-asfd, r=joshtriplett
[rust.git] / src / test / ui / rfc-2005-default-binding-mode / const.stderr
1 error[E0308]: mismatched types
2   --> $DIR/const.rs:14:9
3    |
4 LL | const FOO: Foo = Foo{bar: 5};
5    | -------------- constant defined here
6 ...
7 LL |     match &f {
8    |           -- this expression has type `&Foo`
9 LL |         FOO => {},
10    |         ^^^
11    |         |
12    |         expected `&Foo`, found struct `Foo`
13    |         `FOO` is interpreted as a constant, not a new binding
14    |         help: introduce a new binding instead: `other_foo`
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0308`.