You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lint absolute_paths (#10568) warns about items that use an absolute path instead of a use.
Clippy misses the opposite lint: warn about unqualified paths that are imported where they should not.
Advantage
An example is the log crate, which is often used as log::info! or log::error!. Unfortunately, newcomers may be tempted to import the macros from the log crate.
For consistency, it would be good to have an option to enforce the use of the full path with clippy.
Drawbacks
No response
Example
use log::error;fnf(){error!("fatal error in f");}
Could be written as:
fnf(){
log::error!("fatal error in f");}
The text was updated successfully, but these errors were encountered:
What it does
Lint
absolute_paths
(#10568) warns about items that use an absolute path instead of ause
.Clippy misses the opposite lint: warn about unqualified paths that are imported where they should not.
Advantage
An example is the
log
crate, which is often used aslog::info!
orlog::error!
. Unfortunately, newcomers may be tempted to import the macros from thelog
crate.For consistency, it would be good to have an option to enforce the use of the full path with clippy.
Drawbacks
No response
Example
Could be written as:
The text was updated successfully, but these errors were encountered: