mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Complete desugared and resugared async fn in trait impls
This commit is contained in:
parent
18feb726be
commit
eb64cc8c35
5 changed files with 267 additions and 87 deletions
|
@ -147,6 +147,11 @@ pub fn append_child_raw(node: &(impl Into<SyntaxNode> + Clone), child: impl Elem
|
|||
insert_raw(position, child);
|
||||
}
|
||||
|
||||
pub fn prepend_child(node: &(impl Into<SyntaxNode> + Clone), child: impl Element) {
|
||||
let position = Position::first_child_of(node);
|
||||
insert(position, child);
|
||||
}
|
||||
|
||||
fn ws_before(position: &Position, new: &SyntaxElement) -> Option<SyntaxToken> {
|
||||
let prev = match &position.repr {
|
||||
PositionRepr::FirstChild(_) => return None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue