1 error[E0308]: mismatched types
2 --> $DIR/compatible-variants-in-pat.rs:10:9
5 | - this expression has type `Foo`
7 | ^^^^^^^^^ expected `Foo`, found `Bar`
9 help: try wrapping the pattern in `Foo::Bar`
11 LL | Foo::Bar(Bar { x }) => {
14 error[E0308]: mismatched types
15 --> $DIR/compatible-variants-in-pat.rs:21:9
18 | -------- unit struct defined here
21 | - this expression has type `Option<S>`
25 | expected `Option<S>`, found `S`
26 | `S` is interpreted as a unit struct, not a new binding
28 = note: expected enum `Option<S>`
30 help: try wrapping the pattern in `Some`
34 help: introduce a new binding instead
39 error[E0308]: mismatched types
40 --> $DIR/compatible-variants-in-pat.rs:32:9
43 | -------- unit struct defined here
46 | - this expression has type `Result<S, S>`
50 | expected `Result<S, S>`, found `S`
51 | `S` is interpreted as a unit struct, not a new binding
53 = note: expected enum `Result<S, S>`
55 help: try wrapping the pattern in a variant of `Result`
61 help: introduce a new binding instead
66 error: aborting due to 3 previous errors
68 For more information about this error, try `rustc --explain E0308`.