Open CubeSugarCheese opened 6 days ago
This makes the search N*M, I'd be much happier with a hash set.
This makes the search N*M, I'd be much happier with a hash set.
finish.
During refactoring, I notice that Rustc will treat prelude items and built in types different than normal items.
For prelude, allow shadow by use statement. Like std::result::Result::Ok
shadow by use anyhow::Ok
. This is not what we want.
For built in types, allow same name item. Like str
and core::str
, it also allow coexist with user defined item. This feature must support.
Finally, I choose to forbid same items and ignore all built in types. This rule may need to be improved.
Relevant Issues
18398 Don't auto import items when one is already in scope
17164 Block specific items from being auto-imported
Fixed Problem
Now completions will not hint item that could shadow local item.
Problems that May Arise
Unexpected behavior
Maybe we can auto rename or use long path to disambiguation, and add a option to control the behavior.