Open
Description
Given code like cos(3.3);
where cos
is a method of f64
, we currently look for free functions elsewhere in the dependency tree:
error[E0425]: cannot find function `cos` in this scope
--> src/main.rs:2:13
|
2 | let _ = cos(3.3);
| ^^^ not found in this scope
|
help: consider importing this function
|
1 | use libm::cos;
|
But we should also check for existence of methods under that name for its sole argument.
error[E0425]: cannot find function `cos` in this scope
--> src/main.rs:2:13
|
2 | let _ = cos(3.3);
| ^^^ not found in this scope
|
help: you might have meant to call method `f64::cos`
|
2 | let _ = 3.3.cos();
| ~~~~~~~~~
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: Suggestions generated by the compiler applied by `cargo fix`Diagnostics: Confusing error or lint; hard to understand for new users.Diagnostics: An error or lint that needs small tweaks.Low priorityRelevant to the compiler team, which will review and decide on the PR/issue.