1 error[E0308]: mismatched types
2 --> $DIR/issue-42764.rs:11:43
4 LL | this_function_expects_a_double_option(n);
5 | ------------------------------------- ^ expected enum `DoubleOption`, found `usize`
7 | arguments to this function are incorrect
9 = note: expected enum `DoubleOption<_>`
11 note: function defined here
12 --> $DIR/issue-42764.rs:7:4
14 LL | fn this_function_expects_a_double_option<T>(d: DoubleOption<T>) {}
15 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------
16 help: try wrapping the expression in a variant of `DoubleOption`
18 LL | this_function_expects_a_double_option(DoubleOption::FirstSome(n));
19 | ++++++++++++++++++++++++ +
20 LL | this_function_expects_a_double_option(DoubleOption::AlternativeSome(n));
21 | ++++++++++++++++++++++++++++++ +
23 error[E0308]: mismatched types
24 --> $DIR/issue-42764.rs:27:33
26 LL | let _c = Context { wrapper: Payload{} };
27 | ^^^^^^^^^ expected struct `Wrapper`, found struct `Payload`
29 help: try wrapping the expression in `Wrapper`
31 LL | let _c = Context { wrapper: Wrapper { payload: Payload{} } };
32 | ++++++++++++++++++ +
34 error: aborting due to 2 previous errors
36 For more information about this error, try `rustc --explain E0308`.