]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/boxed-variant-field.rs
Auto merge of #90648 - matthewjasper:assoc-item-cleanup, r=cjgillot
[rust.git] / src / test / ui / suggestions / boxed-variant-field.rs
1 enum Ty {
2     Unit,
3     List(Box<Ty>),
4 }
5
6 fn foo(x: Ty) -> Ty {
7     match x {
8         Ty::Unit => Ty::Unit,
9         Ty::List(elem) => foo(elem),
10         //~^ ERROR mismatched types
11         //~| HELP try dereferencing the `Box`
12         //~| HELP try using a variant of the expected enum
13     }
14 }
15
16 fn main() {}