diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-04-08 19:43:41 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-08 19:43:41 +0100 |
commit | 51e5316de57939a98e33504ac23344f14240b6dc (patch) | |
tree | 3403086d9e04417e92b0c3ad2af09151e698a3c5 /crates/hir_expand/src/eager.rs | |
parent | 5f279d57f0cba600eae8c550654a00b4268812ac (diff) | |
parent | 86b7861612ba074120dfb6bd32c80c569688748d (diff) |
Merge #8428
8428: Use named fields in `MacroCallKind` r=jonas-schievink a=jonas-schievink
bors r+
changelog skip
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir_expand/src/eager.rs')
-rw-r--r-- | crates/hir_expand/src/eager.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/hir_expand/src/eager.rs b/crates/hir_expand/src/eager.rs index 9705526fa..ef126e4ad 100644 --- a/crates/hir_expand/src/eager.rs +++ b/crates/hir_expand/src/eager.rs | |||
@@ -174,8 +174,9 @@ fn lazy_expand( | |||
174 | ) -> ExpandResult<Option<InFile<SyntaxNode>>> { | 174 | ) -> ExpandResult<Option<InFile<SyntaxNode>>> { |
175 | let ast_id = db.ast_id_map(macro_call.file_id).ast_id(¯o_call.value); | 175 | let ast_id = db.ast_id_map(macro_call.file_id).ast_id(¯o_call.value); |
176 | 176 | ||
177 | let id: MacroCallId = | 177 | let id: MacroCallId = def |
178 | def.as_lazy_macro(db, krate, MacroCallKind::FnLike(macro_call.with_value(ast_id))).into(); | 178 | .as_lazy_macro(db, krate, MacroCallKind::FnLike { ast_id: macro_call.with_value(ast_id) }) |
179 | .into(); | ||
179 | 180 | ||
180 | let err = db.macro_expand_error(id); | 181 | let err = db.macro_expand_error(id); |
181 | let value = db.parse_or_expand(id.as_file()).map(|node| InFile::new(id.as_file(), node)); | 182 | let value = db.parse_or_expand(id.as_file()).map(|node| InFile::new(id.as_file(), node)); |