Replace qualified path with use
replaces with a different path
#9537
Labels
A-assists
Broken Window
Bugs / technical debt to be addressed immediately
S-actionable
Someone could pick this issue up and work on it right now
I tried to use "replace qualified path with use" on
std::time::Duration
and gotuse tokio::time::Duration;
, which is a reexport of the same type. I've also run into this when Ireplace qualified path with use
onstd::future::Future
and get another crate's reexport of Future. This isn't a major issue, but is surprising behavior that is not immediately obvious if the top of the file is not visible — the code compiles just fine, but is not what the author intended.If for some obscure-to-me reason there's no way to use the exact qualified path that was typed (std::time in this case), it would be nice to special case
std::*
when picking the rightuse
statement.Happy to help resolve this with guidance. Thanks for rust-analyzer!
Edit: This is as of current HEAD, 80f193e
The text was updated successfully, but these errors were encountered: