rust/src/test/ui/span/missing-unit-argument.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

91 lines
2.5 KiB
Plaintext
Raw Normal View History

error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
2018-12-25 09:56:47 -06:00
--> $DIR/missing-unit-argument.rs:11:33
|
2019-03-09 06:03:44 -06:00
LL | let _: Result<(), String> = Ok();
| ^^-- supplied 0 arguments
|
2017-10-08 20:13:37 -05:00
help: expected the unit value `()`; create it with empty parentheses
|
2019-03-09 06:03:44 -06:00
LL | let _: Result<(), String> = Ok(());
| ++
error[E0061]: this function takes 2 arguments but 0 arguments were supplied
2018-12-25 09:56:47 -06:00
--> $DIR/missing-unit-argument.rs:12:5
|
2019-03-09 06:03:44 -06:00
LL | foo();
| ^^^-- supplied 0 arguments
| |
| expected 2 arguments
|
note: function defined here
--> $DIR/missing-unit-argument.rs:1:4
|
LL | fn foo(():(), ():()) {}
| ^^^ ----- -----
error[E0061]: this function takes 2 arguments but 1 argument was supplied
2018-12-25 09:56:47 -06:00
--> $DIR/missing-unit-argument.rs:13:5
|
2019-03-09 06:03:44 -06:00
LL | foo(());
| ^^^ -- supplied 1 argument
| |
| expected 2 arguments
|
note: function defined here
--> $DIR/missing-unit-argument.rs:1:4
|
LL | fn foo(():(), ():()) {}
| ^^^ ----- -----
error[E0061]: this function takes 1 argument but 0 arguments were supplied
2018-12-25 09:56:47 -06:00
--> $DIR/missing-unit-argument.rs:14:5
|
2019-03-09 06:03:44 -06:00
LL | bar();
| ^^^-- supplied 0 arguments
|
note: function defined here
--> $DIR/missing-unit-argument.rs:2:4
|
LL | fn bar(():()) {}
| ^^^ -----
2017-10-08 20:13:37 -05:00
help: expected the unit value `()`; create it with empty parentheses
|
2019-03-09 06:03:44 -06:00
LL | bar(());
| ++
error[E0061]: this function takes 1 argument but 0 arguments were supplied
2018-12-25 09:56:47 -06:00
--> $DIR/missing-unit-argument.rs:15:7
2017-10-08 20:13:37 -05:00
|
2019-03-09 06:03:44 -06:00
LL | S.baz();
| ^^^- supplied 0 arguments
|
note: associated function defined here
--> $DIR/missing-unit-argument.rs:6:8
|
LL | fn baz(self, (): ()) { }
| ^^^ ---- ------
2017-10-08 20:13:37 -05:00
help: expected the unit value `()`; create it with empty parentheses
|
2019-03-09 06:03:44 -06:00
LL | S.baz(());
| ++
2017-10-08 20:13:37 -05:00
error[E0061]: this function takes 1 argument but 0 arguments were supplied
2018-12-25 09:56:47 -06:00
--> $DIR/missing-unit-argument.rs:16:7
2017-10-08 20:13:37 -05:00
|
2019-03-09 06:03:44 -06:00
LL | S.generic::<()>();
| ^^^^^^^------ supplied 0 arguments
|
note: associated function defined here
--> $DIR/missing-unit-argument.rs:7:8
|
LL | fn generic<T>(self, _: T) { }
| ^^^^^^^ ---- ----
2017-10-08 20:13:37 -05:00
help: expected the unit value `()`; create it with empty parentheses
|
2019-03-09 06:03:44 -06:00
LL | S.generic::<()>(());
| ++
2017-10-08 20:13:37 -05:00
error: aborting due to 6 previous errors
2018-03-03 08:59:40 -06:00
For more information about this error, try `rustc --explain E0061`.