summaryrefslogtreecommitdiffstats
path: root/tests/ui/did_you_mean/issue-42764.stderr
blob: 3819a5a187f97a8d0f4f725bfa5855d3d220a246 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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`.