mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
switch to new rowan
This commit is contained in:
parent
dec9bde108
commit
9e213385c9
50 changed files with 1026 additions and 1227 deletions
|
@ -106,8 +106,10 @@ fn text_edit_for_remove_unnecessary_braces_with_self_in_use_statement(
|
|||
single_use_tree: &ast::UseTree,
|
||||
) -> Option<TextEdit> {
|
||||
let use_tree_list_node = single_use_tree.syntax().parent()?;
|
||||
if single_use_tree.path()?.segment()?.syntax().first_child()?.kind() == SyntaxKind::SELF_KW {
|
||||
let start = use_tree_list_node.prev_sibling()?.range().start();
|
||||
if single_use_tree.path()?.segment()?.syntax().first_child_or_token()?.kind()
|
||||
== SyntaxKind::SELF_KW
|
||||
{
|
||||
let start = use_tree_list_node.prev_sibling_or_token()?.range().start();
|
||||
let end = use_tree_list_node.range().end();
|
||||
let range = TextRange::from_to(start, end);
|
||||
let mut edit_builder = TextEditBuilder::default();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue