Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-expand/src/eager.rs')
| -rw-r--r-- | crates/hir-expand/src/eager.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir-expand/src/eager.rs b/crates/hir-expand/src/eager.rs index f8a560834a..16053840b7 100644 --- a/crates/hir-expand/src/eager.rs +++ b/crates/hir-expand/src/eager.rs @@ -62,9 +62,9 @@ pub fn expand_eager_macro_input( }; let arg_id = MacroCallId::new(db, loc); #[allow(deprecated)] // builtin eager macros are never derives - let (_, _, span) = db.macro_arg(arg_id); + let (_, _, span) = arg_id.macro_arg(db); let ExpandResult { value: (arg_exp, arg_exp_map), err: parse_err } = - db.parse_macro_expansion(arg_id); + arg_id.parse_macro_expansion(db); let mut arg_map = ExpansionSpanMap::empty(); @@ -136,7 +136,7 @@ fn lazy_expand<'db>( ); eager_callback(ast_id.map(|ast_id| (AstPtr::new(macro_call), ast_id)), id); - db.parse_macro_expansion(id) + id.parse_macro_expansion(db) .as_ref() .map(|parse| (InFile::new(id.into(), parse.0.clone()), &parse.1)) } @@ -206,7 +206,7 @@ fn eager_macro_recur( continue; } }; - let ast_id = db.ast_id_map(curr.file_id).ast_id(&call); + let ast_id = curr.file_id.ast_id_map(db).ast_id(&call); let ExpandResult { value, err } = match def.kind { MacroDefKind::BuiltInEager(..) => { let ExpandResult { value, err } = expand_eager_macro_input( @@ -226,7 +226,7 @@ fn eager_macro_recur( call_id, ); let ExpandResult { value: (parse, map), err: err2 } = - db.parse_macro_expansion(call_id); + call_id.parse_macro_expansion(db); map.iter().for_each(|(o, span)| expanded_map.push(o + offset, span)); |