1 error[E0308]: mismatched types
2 --> $DIR/const-in-struct-pat.rs:8:17
5 | ----------- unit struct defined here
7 LL | let Thing { foo } = t;
8 | ^^^ - this expression has type `Thing`
10 | expected struct `String`, found struct `foo`
11 | `foo` is interpreted as a unit struct, not a new binding
13 help: bind the struct field to a different name instead
15 LL | let Thing { foo: other_foo } = t;
18 error: aborting due to previous error
20 For more information about this error, try `rustc --explain E0308`.