]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/boxed-variant-field.stderr
Rollup merge of #103702 - WaffleLapkin:lift-sized-bounds-from-pointer-methods-where...
[rust.git] / tests / ui / suggestions / boxed-variant-field.stderr
1 error[E0308]: mismatched types
2   --> $DIR/boxed-variant-field.rs:9:31
3    |
4 LL |         Ty::List(elem) => foo(elem),
5    |                           --- ^^^^ expected enum `Ty`, found struct `Box`
6    |                           |
7    |                           arguments to this function are incorrect
8    |
9    = note: expected enum `Ty`
10             found struct `Box<Ty>`
11 note: function defined here
12   --> $DIR/boxed-variant-field.rs:6:4
13    |
14 LL | fn foo(x: Ty) -> Ty {
15    |    ^^^ -----
16 help: consider unboxing the value
17    |
18 LL |         Ty::List(elem) => foo(*elem),
19    |                               +
20
21 error: aborting due to previous error
22
23 For more information about this error, try `rustc --explain E0308`.