]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/args-instead-of-tuple-errors.stderr
Rollup merge of #92612 - atopia:update-lib-l4re, r=dtolnay
[rust.git] / src / test / ui / suggestions / args-instead-of-tuple-errors.stderr
1 error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied
2   --> $DIR/args-instead-of-tuple-errors.rs:6:34
3    |
4 LL |     let _: Option<(i32, bool)> = Some(1, 2);
5    |                                  ^^^^ -  - supplied 2 arguments
6    |                                  |
7    |                                  expected 1 argument
8
9 error[E0061]: this function takes 1 argument but 2 arguments were supplied
10   --> $DIR/args-instead-of-tuple-errors.rs:8:5
11    |
12 LL |     int_bool(1, 2);
13    |     ^^^^^^^^ -  - supplied 2 arguments
14    |     |
15    |     expected 1 argument
16    |
17 note: function defined here
18   --> $DIR/args-instead-of-tuple-errors.rs:21:4
19    |
20 LL | fn int_bool(_: (i32, bool)) {
21    |    ^^^^^^^^ --------------
22
23 error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
24   --> $DIR/args-instead-of-tuple-errors.rs:11:28
25    |
26 LL |     let _: Option<(i8,)> = Some();
27    |                            ^^^^-- supplied 0 arguments
28    |                            |
29    |                            expected 1 argument
30
31 error[E0308]: mismatched types
32   --> $DIR/args-instead-of-tuple-errors.rs:14:34
33    |
34 LL |     let _: Option<(i32,)> = Some(5_usize);
35    |                                  ^^^^^^^ expected tuple, found `usize`
36    |
37    = note: expected tuple `(i32,)`
38                found type `usize`
39
40 error[E0308]: mismatched types
41   --> $DIR/args-instead-of-tuple-errors.rs:17:34
42    |
43 LL |     let _: Option<(i32,)> = Some((5_usize));
44    |                                  ^^^^^^^^^ expected tuple, found `usize`
45    |
46    = note: expected tuple `(i32,)`
47                found type `usize`
48
49 error: aborting due to 5 previous errors
50
51 Some errors have detailed explanations: E0061, E0308.
52 For more information about an error, try `rustc --explain E0061`.