Skip to content

Commit 624ee23

Browse files
committed
Use the right HirFileId for LowerCtx when expanding macros in fn parameter types
1 parent 1bd14e0 commit 624ee23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/hir_def/src/generics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ impl GenericParams {
299299
let macro_call = mc.to_node(db.upcast());
300300
match expander.enter_expand::<ast::Type>(db, macro_call) {
301301
Ok(ExpandResult { value: Some((mark, expanded)), .. }) => {
302-
let ctx = LowerCtx::new(db, mc.file_id);
302+
let ctx = LowerCtx::new(db, expander.current_file_id());
303303
let type_ref = TypeRef::from_ast(&ctx, expanded);
304304
self.fill_implicit_impl_trait_args(db, expander, &type_ref);
305305
expander.exit(db, mark);

0 commit comments

Comments
 (0)