mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Reverse fixups
This commit is contained in:
parent
79ebf618ec
commit
c3601e9860
3 changed files with 5 additions and 4 deletions
|
@ -430,7 +430,7 @@ fn macro_expand(db: &dyn AstDatabase, id: MacroCallId) -> ExpandResult<Option<Ar
|
|||
// be reported at the definition site (when we construct a def map).
|
||||
Err(err) => return ExpandResult::str_err(format!("invalid macro definition: {}", err)),
|
||||
};
|
||||
let ExpandResult { value: tt, err } = expander.expand(db, id, ¯o_arg.0);
|
||||
let ExpandResult { value: mut tt, err } = expander.expand(db, id, ¯o_arg.0);
|
||||
// Set a hard limit for the expanded tt
|
||||
let count = tt.count();
|
||||
// XXX: Make ExpandResult a real error and use .map_err instead?
|
||||
|
@ -442,6 +442,8 @@ fn macro_expand(db: &dyn AstDatabase, id: MacroCallId) -> ExpandResult<Option<Ar
|
|||
));
|
||||
}
|
||||
|
||||
fixup::reverse_fixups(&mut tt);
|
||||
|
||||
ExpandResult { value: Some(Arc::new(tt)), err }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue