mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Add Unmerge Use assist
This commit is contained in:
parent
8a869e870a
commit
a3a722de9f
5 changed files with 236 additions and 3 deletions
|
@ -97,7 +97,7 @@ pub fn insert_use<'a>(
|
|||
) -> SyntaxRewriter<'a> {
|
||||
let _p = profile::span("insert_use");
|
||||
let mut rewriter = SyntaxRewriter::default();
|
||||
let use_item = make::use_(make::use_tree(path.clone(), None, None, false));
|
||||
let use_item = make::use_(None, make::use_tree(path.clone(), None, None, false));
|
||||
// merge into existing imports if possible
|
||||
if let Some(mb) = merge {
|
||||
for existing_use in scope.as_syntax_node().children().filter_map(ast::Use::cast) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue