aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/expand_macro.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/expand_macro.rs')
-rw-r--r--crates/ra_ide_api/src/expand_macro.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ide_api/src/expand_macro.rs b/crates/ra_ide_api/src/expand_macro.rs
index e9eb2a7fb..2d478ec09 100644
--- a/crates/ra_ide_api/src/expand_macro.rs
+++ b/crates/ra_ide_api/src/expand_macro.rs
@@ -46,7 +46,7 @@ fn expand_macro_recur(
46 let mut replaces = FxHashMap::default(); 46 let mut replaces = FxHashMap::default();
47 47
48 for child in children.into_iter() { 48 for child in children.into_iter() {
49 let source = hir::Source::new(macro_file_id, source.ast); 49 let source = hir::Source::new(macro_file_id, source.value);
50 let new_node = expand_macro_recur(db, source, &child)?; 50 let new_node = expand_macro_recur(db, source, &child)?;
51 51
52 replaces.insert(child.syntax().clone().into(), new_node.into()); 52 replaces.insert(child.syntax().clone().into(), new_node.into());
@@ -139,7 +139,7 @@ mod tests {
139 } 139 }
140 macro_rules! baz { 140 macro_rules! baz {
141 () => { foo!(); } 141 () => { foo!(); }
142 } 142 }
143 f<|>oo!(); 143 f<|>oo!();
144 "#, 144 "#,
145 ); 145 );
@@ -156,7 +156,7 @@ fn b(){}
156 r#" 156 r#"
157 //- /lib.rs 157 //- /lib.rs
158 macro_rules! foo { 158 macro_rules! foo {
159 () => { 159 () => {
160 fn some_thing() -> u32 { 160 fn some_thing() -> u32 {
161 let a = 0; 161 let a = 0;
162 a + 10 162 a + 10
@@ -172,7 +172,7 @@ fn b(){}
172fn some_thing() -> u32 { 172fn some_thing() -> u32 {
173 let a = 0; 173 let a = 0;
174 a+10 174 a+10
175} 175}
176"###); 176"###);
177 } 177 }
178} 178}