|
| 1 | +error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied |
| 2 | + --> $DIR/args-instead-of-tuple.rs:7:36 |
| 3 | + | |
| 4 | +LL | let _: Result<(i32, i8), ()> = Ok(1, 2); |
| 5 | + | ^^ - - supplied 2 arguments |
| 6 | + | |
| 7 | +help: use parentheses to construct a tuple |
| 8 | + | |
| 9 | +LL | let _: Result<(i32, i8), ()> = Ok((1, 2)); |
| 10 | + | + + |
| 11 | + |
| 12 | +error[E0061]: this enum variant takes 1 argument but 3 arguments were supplied |
| 13 | + --> $DIR/args-instead-of-tuple.rs:9:46 |
| 14 | + | |
| 15 | +LL | let _: Option<(i32, i8, &'static str)> = Some(1, 2, "hi"); |
| 16 | + | ^^^^ - - ---- supplied 3 arguments |
| 17 | + | |
| 18 | +help: use parentheses to construct a tuple |
| 19 | + | |
| 20 | +LL | let _: Option<(i32, i8, &'static str)> = Some((1, 2, "hi")); |
| 21 | + | + + |
| 22 | + |
| 23 | +error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied |
| 24 | + --> $DIR/args-instead-of-tuple.rs:11:25 |
| 25 | + | |
| 26 | +LL | let _: Option<()> = Some(); |
| 27 | + | ^^^^-- supplied 0 arguments |
| 28 | + | |
| 29 | +help: expected the unit value `()`; create it with empty parentheses |
| 30 | + | |
| 31 | +LL | let _: Option<()> = Some(()); |
| 32 | + | ++ |
| 33 | + |
| 34 | +error[E0061]: this function takes 1 argument but 2 arguments were supplied |
| 35 | + --> $DIR/args-instead-of-tuple.rs:14:5 |
| 36 | + | |
| 37 | +LL | f(1, 2); |
| 38 | + | ^ - - supplied 2 arguments |
| 39 | + | |
| 40 | +note: function defined here |
| 41 | + --> $DIR/args-instead-of-tuple.rs:17:4 |
| 42 | + | |
| 43 | +LL | fn f(_: (i32, i32)) { |
| 44 | + | ^ ------------- |
| 45 | +help: use parentheses to construct a tuple |
| 46 | + | |
| 47 | +LL | f((1, 2)); |
| 48 | + | + + |
| 49 | + |
| 50 | +error: aborting due to 4 previous errors |
| 51 | + |
| 52 | +For more information about this error, try `rustc --explain E0061`. |
0 commit comments