1 error[E0308]: mismatched types
2 --> $DIR/boxed-variant-field.rs:9:31
4 LL | Ty::List(elem) => foo(elem),
5 | ^^^^ expected enum `Ty`, found struct `Box`
7 = note: expected enum `Ty`
9 help: consider unboxing the value
11 LL | Ty::List(elem) => foo(*elem),
13 help: try wrapping the expression in `Ty::List`
15 LL | Ty::List(elem) => foo(Ty::List(elem)),
18 error: aborting due to previous error
20 For more information about this error, try `rustc --explain E0308`.