]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/issue-86100-tuple-paren-comma.stderr
Rollup merge of #105795 - nicholasbishop:bishop-stabilize-efiapi, r=joshtriplett
[rust.git] / tests / 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    |     arguments to this function are incorrect
23    |
24    = note: expected tuple `(_,)`
25                found enum `Option<{integer}>`
26 note: function defined here
27   --> $DIR/issue-86100-tuple-paren-comma.rs:5:4
28    |
29 LL | fn foo<T>(_t: (T,)) {}
30    |    ^^^    --------
31 help: use a trailing comma to create a tuple with one element
32    |
33 LL |     foo((Some(3),));
34    |                 +
35
36 error[E0308]: mismatched types
37   --> $DIR/issue-86100-tuple-paren-comma.rs:17:22
38    |
39 LL |     let _s = S { _s: ("abc".to_string()) };
40    |                      ^^^^^^^^^^^^^^^^^^^ expected tuple, found struct `String`
41    |
42    = note: expected tuple `(String,)`
43              found struct `String`
44 help: use a trailing comma to create a tuple with one element
45    |
46 LL |     let _s = S { _s: ("abc".to_string(),) };
47    |                                        +
48
49 error[E0308]: mismatched types
50   --> $DIR/issue-86100-tuple-paren-comma.rs:23:22
51    |
52 LL |     let _x: (i32,) = (t);
53    |             ------   ^^^ expected a tuple with 1 element, found one with 2 elements
54    |             |
55    |             expected due to this
56    |
57    = note: expected tuple `(i32,)`
58               found tuple `({integer}, {integer})`
59
60 error: aborting due to 4 previous errors
61
62 For more information about this error, try `rustc --explain E0308`.