error[E0308]: mismatched types --> $DIR/issue-42764.rs:11:43 | LL | this_function_expects_a_double_option(n); | ^ expected enum `DoubleOption`, found `usize` | = note: expected enum `DoubleOption<_>` found type `usize` help: try wrapping the expression in a variant of `DoubleOption` | LL | this_function_expects_a_double_option(DoubleOption::FirstSome(n)); | ++++++++++++++++++++++++ + LL | this_function_expects_a_double_option(DoubleOption::AlternativeSome(n)); | ++++++++++++++++++++++++++++++ + error[E0308]: mismatched types --> $DIR/issue-42764.rs:27:33 | LL | let _c = Context { wrapper: Payload{} }; | ^^^^^^^^^ expected struct `Wrapper`, found struct `Payload` error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`.