Test 1-tuple parentheses wrapping
This commit is contained in:
parent
91a43f0423
commit
72d3b45af0
6 changed files with 78 additions and 14 deletions
|
@ -15,7 +15,7 @@ LL | int_bool(1, 2);
|
|||
| expected 1 argument
|
||||
|
|
||||
note: function defined here
|
||||
--> $DIR/args-instead-of-tuple-errors.rs:15:4
|
||||
--> $DIR/args-instead-of-tuple-errors.rs:21:4
|
||||
|
|
||||
LL | fn int_bool(_: (i32, bool)) {
|
||||
| ^^^^^^^^ --------------
|
||||
|
@ -28,6 +28,25 @@ LL | let _: Option<(i8,)> = Some();
|
|||
| |
|
||||
| expected 1 argument
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/args-instead-of-tuple-errors.rs:14:34
|
||||
|
|
||||
LL | let _: Option<(i32,)> = Some(5_usize);
|
||||
| ^^^^^^^ expected tuple, found `usize`
|
||||
|
|
||||
= note: expected tuple `(i32,)`
|
||||
found type `usize`
|
||||
|
||||
For more information about this error, try `rustc --explain E0061`.
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/args-instead-of-tuple-errors.rs:17:34
|
||||
|
|
||||
LL | let _: Option<(i32,)> = Some((5_usize));
|
||||
| ^^^^^^^^^ expected tuple, found `usize`
|
||||
|
|
||||
= note: expected tuple `(i32,)`
|
||||
found type `usize`
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0061, E0308.
|
||||
For more information about an error, try `rustc --explain E0061`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue