]> git.lizzy.rs Git - rust.git/commit
remove find_use_placement
authorFausto <mi9uel9@gmail.com>
Fri, 18 Mar 2022 21:13:38 +0000 (17:13 -0400)
committerMiguel Guarniz <mi9uel9@gmail.com>
Thu, 31 Mar 2022 21:20:03 +0000 (17:20 -0400)
commit8c2353b6c142d5665006cf79cbec511f666dbed2
tree0cbd792df8f22b7f9b4dbece1af163ebda41e4fb
parent0677edc86e342f333d4828b0ee1ef395a4e70fe5
remove find_use_placement

A more robust solution to finding where to place use suggestions was added.
The algorithm uses the AST to find the span for the suggestion so we pass this span
down to the HIR during lowering and use it.

Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
12 files changed:
compiler/rustc_ast_lowering/src/index.rs
compiler/rustc_ast_lowering/src/item.rs
compiler/rustc_hir/src/hir.rs
compiler/rustc_middle/src/hir/map/mod.rs
compiler/rustc_save_analysis/src/dump_visitor.rs
compiler/rustc_save_analysis/src/lib.rs
compiler/rustc_typeck/src/check/method/suggest.rs
src/librustdoc/html/render/span_map.rs
src/librustdoc/visit_ast.rs
src/test/ui/imports/overlapping_pub_trait.rs
src/test/ui/imports/unnamed_pub_trait.rs
src/test/ui/suggestions/use-placement-typeck.fixed