mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Curley tokens
This commit is contained in:
parent
1c5d859195
commit
460c8bbdec
6 changed files with 47 additions and 131 deletions
|
@ -98,7 +98,7 @@ impl ast::ItemList {
|
|||
None => match self.l_curly_token() {
|
||||
Some(it) => (
|
||||
" ".to_string() + &leading_indent(self.syntax()).unwrap_or_default(),
|
||||
InsertPosition::After(it.syntax().clone().into()),
|
||||
InsertPosition::After(it.into()),
|
||||
),
|
||||
None => return self.clone(),
|
||||
},
|
||||
|
@ -142,7 +142,7 @@ impl ast::RecordFieldList {
|
|||
macro_rules! after_l_curly {
|
||||
() => {{
|
||||
let anchor = match self.l_curly_token() {
|
||||
Some(it) => it.syntax().clone().into(),
|
||||
Some(it) => it.into(),
|
||||
None => return self.clone(),
|
||||
};
|
||||
InsertPosition::After(anchor)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue