]> git.lizzy.rs Git - rust.git/blob - src/test/ui/did_you_mean/issue-42764.stderr
only issue "variant of the expected type" suggestion for enums
[rust.git] / src / test / ui / did_you_mean / issue-42764.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-42764.rs:21:43
3    |
4 LL |     this_function_expects_a_double_option(n);
5    |                                           ^ expected enum `DoubleOption`, found usize
6    |
7    = note: expected type `DoubleOption<_>`
8               found type `usize`
9 help: try using a variant of the expected type
10    |
11 LL |     this_function_expects_a_double_option(DoubleOption::FirstSome(n));
12    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
13 LL |     this_function_expects_a_double_option(DoubleOption::AlternativeSome(n));
14    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15
16 error[E0308]: mismatched types
17   --> $DIR/issue-42764.rs:37:33
18    |
19 LL |     let _c = Context { wrapper: Payload{} };
20    |                                 ^^^^^^^^^ expected struct `Wrapper`, found struct `Payload`
21    |
22    = note: expected type `Wrapper`
23               found type `Payload`
24
25 error: aborting due to 2 previous errors
26
27 For more information about this error, try `rustc --explain E0308`.