]> git.proxmox.com Git - rustc.git/blob - src/test/ui/suggestions/const-in-struct-pat.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / suggestions / const-in-struct-pat.stderr
1 error[E0308]: mismatched types
2 --> $DIR/const-in-struct-pat.rs:8:17
3 |
4 LL | struct foo;
5 | ----------- unit struct defined here
6 ...
7 LL | let Thing { foo } = t;
8 | ^^^ - this expression has type `Thing`
9 | |
10 | expected struct `String`, found struct `foo`
11 | `foo` is interpreted as a unit struct, not a new binding
12 |
13 help: bind the struct field to a different name instead
14 |
15 LL | let Thing { foo: other_foo } = t;
16 | ^^^^^^^^^^^
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0308`.