62ba3e70a1
The previous output was unintuitive to users.
37 lines
1.4 KiB
Plaintext
37 lines
1.4 KiB
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/issue-42764.rs:11:43
|
|
|
|
|
LL | this_function_expects_a_double_option(n);
|
|
| ------------------------------------- ^ expected `DoubleOption<_>`, found `usize`
|
|
| |
|
|
| arguments to this function are incorrect
|
|
|
|
|
= note: expected enum `DoubleOption<_>`
|
|
found type `usize`
|
|
note: function defined here
|
|
--> $DIR/issue-42764.rs:7:4
|
|
|
|
|
LL | fn this_function_expects_a_double_option<T>(d: DoubleOption<T>) {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------
|
|
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 `Wrapper`, found `Payload`
|
|
|
|
|
help: try wrapping the expression in `Wrapper`
|
|
|
|
|
LL | let _c = Context { wrapper: Wrapper { payload: Payload{} } };
|
|
| ++++++++++++++++++ +
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|