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