2021-06-07 16:16:03 -05:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/issue-86100-tuple-paren-comma.rs:9:22
|
|
|
|
|
|
|
|
|
LL | let _x: (i32,) = (5);
|
|
|
|
| ------ ^^^ expected tuple, found integer
|
|
|
|
| |
|
|
|
|
| expected due to this
|
|
|
|
|
|
|
|
|
= note: expected tuple `(i32,)`
|
|
|
|
found type `{integer}`
|
|
|
|
help: use a trailing comma to create a tuple with one element
|
|
|
|
|
|
|
|
|
LL | let _x: (i32,) = (5,);
|
2022-01-28 17:27:01 -06:00
|
|
|
| +
|
2021-06-07 16:16:03 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/issue-86100-tuple-paren-comma.rs:13:9
|
|
|
|
|
|
|
|
|
LL | foo((Some(3)));
|
|
|
|
| ^^^^^^^^^ expected tuple, found enum `Option`
|
|
|
|
|
|
|
|
|
= note: expected tuple `(_,)`
|
|
|
|
found enum `Option<{integer}>`
|
|
|
|
help: use a trailing comma to create a tuple with one element
|
|
|
|
|
|
|
|
|
LL | foo((Some(3),));
|
2022-01-28 17:27:01 -06:00
|
|
|
| +
|
2021-06-07 16:16:03 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/issue-86100-tuple-paren-comma.rs:17:22
|
|
|
|
|
|
|
|
|
LL | let _s = S { _s: ("abc".to_string()) };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^ expected tuple, found struct `String`
|
|
|
|
|
|
|
|
|
= note: expected tuple `(String,)`
|
|
|
|
found struct `String`
|
|
|
|
help: use a trailing comma to create a tuple with one element
|
|
|
|
|
|
|
|
|
LL | let _s = S { _s: ("abc".to_string(),) };
|
2022-01-28 17:27:01 -06:00
|
|
|
| +
|
2021-06-07 16:16:03 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/issue-86100-tuple-paren-comma.rs:23:22
|
|
|
|
|
|
|
|
|
LL | let _x: (i32,) = (t);
|
|
|
|
| ------ ^^^ expected a tuple with 1 element, found one with 2 elements
|
|
|
|
| |
|
|
|
|
| expected due to this
|
|
|
|
|
|
|
|
|
= note: expected tuple `(i32,)`
|
|
|
|
found tuple `({integer}, {integer})`
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|