]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #96353 - estebank:issue-95413, r=compiler-errors
authorbors <bors@rust-lang.org>
Wed, 4 May 2022 01:58:23 +0000 (01:58 +0000)
committerbors <bors@rust-lang.org>
Wed, 4 May 2022 01:58:23 +0000 (01:58 +0000)
When suggesting to import an item, also suggest changing the path if appropriate

When we don't find an item we search all of them for an appropriate
import and suggest `use`ing it. This is sometimes done for expressions
that have paths with more than one segment. We now also suggest changing
that path to work with the `use`.

Fix #95413

1  2 
compiler/rustc_resolve/src/late.rs

Simple merge