fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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