2023-02-23 17:27:06 +00:00
|
|
|
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
|
2022-12-28 01:57:39 +00:00
|
|
|
--> $DIR/issue-104287.rs:10:5
|
2022-11-19 17:54:19 +00:00
|
|
|
|
|
2022-12-28 01:57:39 +00:00
|
|
|
LL | foo::<()>(x);
|
2024-07-22 22:51:53 +00:00
|
|
|
| ^^^------ help: remove the unnecessary generics
|
|
|
|
| |
|
|
|
|
| expected 0 generic arguments
|
2022-12-28 01:57:39 +00:00
|
|
|
|
|
2023-02-21 21:11:08 +00:00
|
|
|
note: method defined here, with 0 generic parameters
|
2022-12-28 01:57:39 +00:00
|
|
|
--> $DIR/issue-104287.rs:6:8
|
|
|
|
|
|
|
|
|
LL | fn foo(&self) {}
|
|
|
|
| ^^^
|
2022-11-19 17:54:19 +00:00
|
|
|
|
2022-12-28 01:57:39 +00:00
|
|
|
error[E0425]: cannot find function `foo` in this scope
|
|
|
|
--> $DIR/issue-104287.rs:10:5
|
2022-11-19 17:54:19 +00:00
|
|
|
|
|
2022-12-28 01:57:39 +00:00
|
|
|
LL | foo::<()>(x);
|
|
|
|
| ^^^ not found in this scope
|
2022-11-19 17:54:19 +00:00
|
|
|
|
|
2022-12-28 01:57:39 +00:00
|
|
|
help: use the `.` operator to call the method `foo` on `&S`
|
2022-11-19 17:54:19 +00:00
|
|
|
|
|
2022-12-28 01:57:39 +00:00
|
|
|
LL - foo::<()>(x);
|
|
|
|
LL + x.foo();
|
2022-11-19 17:54:19 +00:00
|
|
|
|
|
|
|
|
|
2022-12-28 01:57:39 +00:00
|
|
|
error: aborting due to 2 previous errors
|
2022-11-19 17:54:19 +00:00
|
|
|
|
|
|
|
Some errors have detailed explanations: E0107, E0425.
|
|
|
|
For more information about an error, try `rustc --explain E0107`.
|