2022-11-19 11:54:19 -06:00
|
|
|
error[E0107]: this associated function 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);
|
|
|
|
| ^^^------ help: remove these generics
|
2022-11-19 11:54:19 -06:00
|
|
|
| |
|
|
|
|
| expected 0 generic arguments
|
2022-12-27 19:57:39 -06:00
|
|
|
|
|
|
|
|
note: associated function defined here, with 0 generic parameters
|
|
|
|
--> $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`.
|