mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Rename Source::ast -> Source::value
This commit is contained in:
parent
e975f6364c
commit
36e3fc9d54
43 changed files with 226 additions and 214 deletions
|
@ -46,7 +46,7 @@ fn expand_macro_recur(
|
|||
let mut replaces = FxHashMap::default();
|
||||
|
||||
for child in children.into_iter() {
|
||||
let source = hir::Source::new(macro_file_id, source.ast);
|
||||
let source = hir::Source::new(macro_file_id, source.value);
|
||||
let new_node = expand_macro_recur(db, source, &child)?;
|
||||
|
||||
replaces.insert(child.syntax().clone().into(), new_node.into());
|
||||
|
@ -139,7 +139,7 @@ mod tests {
|
|||
}
|
||||
macro_rules! baz {
|
||||
() => { foo!(); }
|
||||
}
|
||||
}
|
||||
f<|>oo!();
|
||||
"#,
|
||||
);
|
||||
|
@ -156,7 +156,7 @@ fn b(){}
|
|||
r#"
|
||||
//- /lib.rs
|
||||
macro_rules! foo {
|
||||
() => {
|
||||
() => {
|
||||
fn some_thing() -> u32 {
|
||||
let a = 0;
|
||||
a + 10
|
||||
|
@ -172,7 +172,7 @@ fn b(){}
|
|||
fn some_thing() -> u32 {
|
||||
let a = 0;
|
||||
a+10
|
||||
}
|
||||
}
|
||||
"###);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue