mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Fix the eager token maps by re-mapping the textranges between the input and input expansion
This commit is contained in:
parent
2366c16bf9
commit
6a7b905c86
18 changed files with 434 additions and 157 deletions
|
@ -698,7 +698,7 @@ impl Module {
|
|||
|
||||
fn emit_macro_def_diagnostics(db: &dyn HirDatabase, acc: &mut Vec<AnyDiagnostic>, m: Macro) {
|
||||
let id = macro_id_to_def_id(db.upcast(), m.id);
|
||||
if let hir_expand::db::TokenExpander::DeclarativeMacro(expander) = db.macro_def(id) {
|
||||
if let hir_expand::db::TokenExpander::DeclarativeMacro(expander) = db.macro_expander(id) {
|
||||
if let Some(e) = expander.mac.err() {
|
||||
let Some(ast) = id.ast_id().left() else {
|
||||
never!("declarative expander for non decl-macro: {:?}", e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue