]> git.lizzy.rs Git - rust.git/commit
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)
commit9add63257bd3968a7b7ea3372db9d548561e3396
tree33460397fea64e272fb3ffa878b2ec8eb44ea8c0
parent1b2e0b60cc5aec81b48835bfc322c426e2f07cd1
parent4934a9e6430b3fcb98f77205f8a625c7ffebd628
Auto merge of #96353 - estebank:issue-95413, r=compiler-errors

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
compiler/rustc_resolve/src/late.rs