rust/src/test/ui/suggestions/boxed-variant-field.stderr

21 lines
648 B
Plaintext
Raw Normal View History

error[E0308]: mismatched types
--> $DIR/boxed-variant-field.rs:9:31
|
LL | Ty::List(elem) => foo(elem),
| ^^^^ expected enum `Ty`, found struct `Box`
|
= note: expected enum `Ty`
found struct `Box<Ty>`
help: try dereferencing the `Box`
|
LL | Ty::List(elem) => foo(*elem),
| +
2021-11-16 12:57:12 -06:00
help: try wrapping the expression in `Ty::List`
|
LL | Ty::List(elem) => foo(Ty::List(elem)),
2021-11-16 12:57:12 -06:00
| +++++++++ +
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.