]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/boxed-variant-field.rs
Rollup merge of #105230 - cjgillot:issue-104312, r=petrochenkov
[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 consider unboxing the value
12     }
13 }
14
15 fn main() {}