Description
So to clarify, I would see the following possible action items:
detect when a trait autoimport would shadow an inherent method and downrank those completions
detect when a trait autoimport would shadow an inherent method and instead complete a fully qualified method call (e.g.
foo.borrow_<|>
->std::borrow::BorrowMut::borrow_mut(foo)
)detect when there's an inherent method currently shadowed by a trait method, and complete the fully qualified method call instead (e.g. when there's
use std::borrow::BorrowMut;
already, provideRefCell::borrow_mut(foo)
as a completion)when using the UFCS -> method call assist, detect if the method call would be shadowed and remove e.g. the BorrowMut import automatically (maybe only if it's unused)
Originally posted by flodiebold in #13786