diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-20 10:10:03 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-20 10:10:03 +0000 |
commit | 3d56e3d85516fe9061aea84571ac88c3322a687c (patch) | |
tree | bd923b623ffe43df04ef00e1f0662c00c0d919d1 /crates/ra_ide_api/src/expand.rs | |
parent | fa50b16cb2309c0c4fcb4e90378993a1f3d2ffb6 (diff) | |
parent | 51baaf298d4ac56036062786bf070aeab7ab8e79 (diff) |
Merge #2323
2323: Rename with_ast -> with_value r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/expand.rs')
-rw-r--r-- | crates/ra_ide_api/src/expand.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/expand.rs b/crates/ra_ide_api/src/expand.rs index 0228bced9..0ad125a9e 100644 --- a/crates/ra_ide_api/src/expand.rs +++ b/crates/ra_ide_api/src/expand.rs | |||
@@ -28,7 +28,7 @@ pub(crate) fn original_range(db: &RootDatabase, node: Source<&SyntaxNode>) -> Fi | |||
28 | .value | 28 | .value |
29 | .descendants_with_tokens() | 29 | .descendants_with_tokens() |
30 | .filter_map(|it| it.into_token()) | 30 | .filter_map(|it| it.into_token()) |
31 | .find_map(|it| expansion.map_token_up(node.with_ast(&it))); | 31 | .find_map(|it| expansion.map_token_up(node.with_value(&it))); |
32 | 32 | ||
33 | match token { | 33 | match token { |
34 | Some(it) => { | 34 | Some(it) => { |
@@ -54,7 +54,7 @@ pub(crate) fn descend_into_macros( | |||
54 | return None; | 54 | return None; |
55 | } | 55 | } |
56 | let source_analyzer = | 56 | let source_analyzer = |
57 | hir::SourceAnalyzer::new(db, token.with_ast(token.value.parent()).as_ref(), None); | 57 | hir::SourceAnalyzer::new(db, token.with_value(token.value.parent()).as_ref(), None); |
58 | let exp = source_analyzer.expand(db, ¯o_call)?; | 58 | let exp = source_analyzer.expand(db, ¯o_call)?; |
59 | exp.map_token_down(db, token.as_ref()) | 59 | exp.map_token_down(db, token.as_ref()) |
60 | }) | 60 | }) |