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

75 lines
2 KiB
Text
Raw Normal View History

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