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
|
@ -1162,7 +1162,7 @@ pub mod tokens {
|
|||
|
||||
pub(super) static SOURCE_FILE: LazyLock<Parse<SourceFile>> = LazyLock::new(|| {
|
||||
SourceFile::parse(
|
||||
"const C: <()>::Item = ( true && true , true || true , 1 != 1, 2 == 2, 3 < 3, 4 <= 4, 5 > 5, 6 >= 6, !true, *p, &p , &mut p, { let _ @ [] })\n;\n\nimpl A for B where: {}", Edition::CURRENT,
|
||||
"const C: <()>::Item = ( true && true , true || true , 1 != 1, 2 == 2, 3 < 3, 4 <= 4, 5 > 5, 6 >= 6, !true, *p, &p , &mut p, async { let _ @ [] })\n;\n\nimpl A for B where: {}", Edition::CURRENT,
|
||||
)
|
||||
});
|
||||
|
||||
|
|
|
@ -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