X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftest%2Fui%2Ftypeck%2Fstruct-enum-wrong-args.stderr;h=721b2c821efec8b185b68d0d3918795a960c9647;hb=1dc672a766832287f2f998a1cdde76ea74cd480d;hp=6e99feed33f9c9d99c43ceeb17961e0c319aee5d;hpb=fd5bed73d0e0cd04e5616436950cf01df4cb30f8;p=rust.git diff --git a/src/test/ui/typeck/struct-enum-wrong-args.stderr b/src/test/ui/typeck/struct-enum-wrong-args.stderr index 6e99feed33f..721b2c821ef 100644 --- a/src/test/ui/typeck/struct-enum-wrong-args.stderr +++ b/src/test/ui/typeck/struct-enum-wrong-args.stderr @@ -2,95 +2,116 @@ error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied --> $DIR/struct-enum-wrong-args.rs:6:13 | LL | let _ = Some(3, 2); - | ^^^^ - - supplied 2 arguments - | | - | expected 1 argument + | ^^^^ - argument unexpected + | +help: remove the extra argument + | +LL | let _ = Some(3); + | ~~~~~~~ error[E0061]: this enum variant takes 1 argument but 3 arguments were supplied --> $DIR/struct-enum-wrong-args.rs:7:13 | LL | let _ = Ok(3, 6, 2); - | ^^ - - - supplied 3 arguments - | | - | expected 1 argument + | ^^ - - argument unexpected + | | + | argument unexpected + | +help: remove the extra arguments + | +LL | let _ = Ok(3); + | ~~~~~ error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied --> $DIR/struct-enum-wrong-args.rs:8:13 | LL | let _ = Ok(); - | ^^-- supplied 0 arguments - | | - | expected 1 argument + | ^^-- an argument is missing + | +help: provide the argument + | +LL | let _ = Ok({_}); + | ~~~~~~~ error[E0061]: this struct takes 1 argument but 0 arguments were supplied --> $DIR/struct-enum-wrong-args.rs:9:13 | LL | let _ = Wrapper(); - | ^^^^^^^-- supplied 0 arguments - | | - | expected 1 argument + | ^^^^^^^-- an argument of type `i32` is missing | note: tuple struct defined here --> $DIR/struct-enum-wrong-args.rs:2:8 | LL | struct Wrapper(i32); | ^^^^^^^ +help: provide the argument + | +LL | let _ = Wrapper({i32}); + | ~~~~~~~~~~~~~~ error[E0061]: this struct takes 1 argument but 2 arguments were supplied --> $DIR/struct-enum-wrong-args.rs:10:13 | LL | let _ = Wrapper(5, 2); - | ^^^^^^^ - - supplied 2 arguments - | | - | expected 1 argument + | ^^^^^^^ - argument unexpected | note: tuple struct defined here --> $DIR/struct-enum-wrong-args.rs:2:8 | LL | struct Wrapper(i32); | ^^^^^^^ +help: remove the extra argument + | +LL | let _ = Wrapper(5); + | ~~~~~~~~~~ error[E0061]: this struct takes 2 arguments but 0 arguments were supplied --> $DIR/struct-enum-wrong-args.rs:11:13 | LL | let _ = DoubleWrapper(); - | ^^^^^^^^^^^^^-- supplied 0 arguments - | | - | expected 2 arguments + | ^^^^^^^^^^^^^-- two arguments of type `i32` and `i32` are missing | note: tuple struct defined here --> $DIR/struct-enum-wrong-args.rs:3:8 | LL | struct DoubleWrapper(i32, i32); | ^^^^^^^^^^^^^ +help: provide the arguments + | +LL | let _ = DoubleWrapper({i32}, {i32}); + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0061]: this struct takes 2 arguments but 1 argument was supplied --> $DIR/struct-enum-wrong-args.rs:12:13 | LL | let _ = DoubleWrapper(5); - | ^^^^^^^^^^^^^ - supplied 1 argument - | | - | expected 2 arguments + | ^^^^^^^^^^^^^--- an argument of type `i32` is missing | note: tuple struct defined here --> $DIR/struct-enum-wrong-args.rs:3:8 | LL | struct DoubleWrapper(i32, i32); | ^^^^^^^^^^^^^ +help: provide the argument + | +LL | let _ = DoubleWrapper(5, {i32}); + | ~~~~~~~~~~~~~~~~~~~~~~~ error[E0061]: this struct takes 2 arguments but 3 arguments were supplied --> $DIR/struct-enum-wrong-args.rs:13:13 | LL | let _ = DoubleWrapper(5, 2, 7); - | ^^^^^^^^^^^^^ - - - supplied 3 arguments - | | - | expected 2 arguments + | ^^^^^^^^^^^^^ - argument unexpected | note: tuple struct defined here --> $DIR/struct-enum-wrong-args.rs:3:8 | LL | struct DoubleWrapper(i32, i32); | ^^^^^^^^^^^^^ +help: remove the extra argument + | +LL | let _ = DoubleWrapper(5, 2); + | ~~~~~~~~~~~~~~~~~~~ error: aborting due to 8 previous errors