]>
Commit | Line | Data |
---|---|---|
3b2f2976 | 1 | error[E0308]: mismatched types |
0731742a | 2 | --> $DIR/issue-42764.rs:11:43 |
3b2f2976 | 3 | | |
0531ce1d | 4 | LL | this_function_expects_a_double_option(n); |
9ffffee4 | 5 | | ------------------------------------- ^ expected `DoubleOption<_>`, found `usize` |
923072b8 FG |
6 | | | |
7 | | arguments to this function are incorrect | |
3b2f2976 | 8 | | |
60c5eb7d | 9 | = note: expected enum `DoubleOption<_>` |
3b2f2976 | 10 | found type `usize` |
923072b8 FG |
11 | note: function defined here |
12 | --> $DIR/issue-42764.rs:7:4 | |
13 | | | |
14 | LL | fn this_function_expects_a_double_option<T>(d: DoubleOption<T>) {} | |
15 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------ | |
3c0e092e | 16 | help: try wrapping the expression in a variant of `DoubleOption` |
3b2f2976 | 17 | | |
0531ce1d | 18 | LL | this_function_expects_a_double_option(DoubleOption::FirstSome(n)); |
3c0e092e | 19 | | ++++++++++++++++++++++++ + |
0531ce1d | 20 | LL | this_function_expects_a_double_option(DoubleOption::AlternativeSome(n)); |
3c0e092e | 21 | | ++++++++++++++++++++++++++++++ + |
3b2f2976 | 22 | |
0bf4aa26 | 23 | error[E0308]: mismatched types |
0731742a | 24 | --> $DIR/issue-42764.rs:27:33 |
0bf4aa26 XL |
25 | | |
26 | LL | let _c = Context { wrapper: Payload{} }; | |
9ffffee4 | 27 | | ^^^^^^^^^ expected `Wrapper`, found `Payload` |
064997fb FG |
28 | | |
29 | help: try wrapping the expression in `Wrapper` | |
30 | | | |
31 | LL | let _c = Context { wrapper: Wrapper { payload: Payload{} } }; | |
32 | | ++++++++++++++++++ + | |
0bf4aa26 XL |
33 | |
34 | error: aborting due to 2 previous errors | |
3b2f2976 | 35 | |
0531ce1d | 36 | For more information about this error, try `rustc --explain E0308`. |