rust/tests/ui/did_you_mean/issue-42764.stderr
Esteban Küber 62ba3e70a1 Modify primary span label for E0308
The previous output was unintuitive to users.
2023-01-30 20:12:19 +00:00

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`.