]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/issue-86100-tuple-paren-comma.stderr
Rollup merge of #90420 - GuillaumeGomez:rustdoc-internals-feature, r=camelid
[rust.git] / src / test / ui / suggestions / issue-86100-tuple-paren-comma.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-86100-tuple-paren-comma.rs:9:22
3    |
4 LL |     let _x: (i32,) = (5);
5    |             ------   ^^^ expected tuple, found integer
6    |             |
7    |             expected due to this
8    |
9    = note: expected tuple `(i32,)`
10                found type `{integer}`
11 help: use a trailing comma to create a tuple with one element
12    |
13 LL |     let _x: (i32,) = (5,);
14    |                      ~~~~
15
16 error[E0308]: mismatched types
17   --> $DIR/issue-86100-tuple-paren-comma.rs:13:9
18    |
19 LL |     foo((Some(3)));
20    |         ^^^^^^^^^ expected tuple, found enum `Option`
21    |
22    = note: expected tuple `(_,)`
23                found enum `Option<{integer}>`
24 help: use a trailing comma to create a tuple with one element
25    |
26 LL |     foo((Some(3),));
27    |         ~~~~~~~~~~
28
29 error[E0308]: mismatched types
30   --> $DIR/issue-86100-tuple-paren-comma.rs:17:22
31    |
32 LL |     let _s = S { _s: ("abc".to_string()) };
33    |                      ^^^^^^^^^^^^^^^^^^^ expected tuple, found struct `String`
34    |
35    = note: expected tuple `(String,)`
36              found struct `String`
37 help: use a trailing comma to create a tuple with one element
38    |
39 LL |     let _s = S { _s: ("abc".to_string(),) };
40    |                      ~~~~~~~~~~~~~~~~~~~~
41
42 error[E0308]: mismatched types
43   --> $DIR/issue-86100-tuple-paren-comma.rs:23:22
44    |
45 LL |     let _x: (i32,) = (t);
46    |             ------   ^^^ expected a tuple with 1 element, found one with 2 elements
47    |             |
48    |             expected due to this
49    |
50    = note: expected tuple `(i32,)`
51               found tuple `({integer}, {integer})`
52
53 error: aborting due to 4 previous errors
54
55 For more information about this error, try `rustc --explain E0308`.