]> git.lizzy.rs Git - rust.git/blob - tests/ui/did_you_mean/issue-42764.stderr
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[rust.git] / tests / ui / did_you_mean / issue-42764.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-42764.rs:11:43
3    |
4 LL |     this_function_expects_a_double_option(n);
5    |     ------------------------------------- ^ expected enum `DoubleOption`, found `usize`
6    |     |
7    |     arguments to this function are incorrect
8    |
9    = note: expected enum `DoubleOption<_>`
10               found type `usize`
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    |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^    ------------------
16 help: try wrapping the expression in a variant of `DoubleOption`
17    |
18 LL |     this_function_expects_a_double_option(DoubleOption::FirstSome(n));
19    |                                           ++++++++++++++++++++++++ +
20 LL |     this_function_expects_a_double_option(DoubleOption::AlternativeSome(n));
21    |                                           ++++++++++++++++++++++++++++++ +
22
23 error[E0308]: mismatched types
24   --> $DIR/issue-42764.rs:27:33
25    |
26 LL |     let _c = Context { wrapper: Payload{} };
27    |                                 ^^^^^^^^^ expected struct `Wrapper`, found struct `Payload`
28    |
29 help: try wrapping the expression in `Wrapper`
30    |
31 LL |     let _c = Context { wrapper: Wrapper { payload: Payload{} } };
32    |                                 ++++++++++++++++++           +
33
34 error: aborting due to 2 previous errors
35
36 For more information about this error, try `rustc --explain E0308`.