]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/suggest-removing-tuple-struct-field.stderr
Rollup merge of #105172 - alexs-sh:issue-98861-fix-next, r=scottmcm
[rust.git] / tests / ui / mismatched_types / suggest-removing-tuple-struct-field.stderr
1 error[E0308]: mismatched types
2   --> $DIR/suggest-removing-tuple-struct-field.rs:11:13
3    |
4 LL |     some_fn(value.0);
5    |     ------- ^^^^^^^ expected struct `MyWrapper`, found `u32`
6    |     |
7    |     arguments to this function are incorrect
8    |
9 note: function defined here
10   --> $DIR/suggest-removing-tuple-struct-field.rs:15:4
11    |
12 LL | fn some_fn(wrapped: MyWrapper) {
13    |    ^^^^^^^ ------------------
14 help: consider removing the tuple struct field `0`
15    |
16 LL -     some_fn(value.0);
17 LL +     some_fn(value);
18    |
19
20 error[E0308]: mismatched types
21   --> $DIR/suggest-removing-tuple-struct-field.rs:12:13
22    |
23 LL |     some_fn(my_wrapper!(123).0);
24    |     ------- ^^^^^^^^^^^^^^^^^^ expected struct `MyWrapper`, found `u32`
25    |     |
26    |     arguments to this function are incorrect
27    |
28 note: function defined here
29   --> $DIR/suggest-removing-tuple-struct-field.rs:15:4
30    |
31 LL | fn some_fn(wrapped: MyWrapper) {
32    |    ^^^^^^^ ------------------
33 help: consider removing the tuple struct field `0`
34    |
35 LL -     some_fn(my_wrapper!(123).0);
36 LL +     some_fn(my_wrapper!(123));
37    |
38
39 error: aborting due to 2 previous errors
40
41 For more information about this error, try `rustc --explain E0308`.