From cf3b4f1e208247c9d171273dabff9c6b3c98a240 Mon Sep 17 00:00:00 2001 From: cynecx Date: Sat, 10 Apr 2021 17:49:12 +0200 Subject: hir_ty: Expand macros at type position --- crates/hir_expand/src/db.rs | 1 + crates/hir_expand/src/eager.rs | 1 + 2 files changed, 2 insertions(+) (limited to 'crates/hir_expand') diff --git a/crates/hir_expand/src/db.rs b/crates/hir_expand/src/db.rs index ca705ee9d..1e4b0cc19 100644 --- a/crates/hir_expand/src/db.rs +++ b/crates/hir_expand/src/db.rs @@ -440,6 +440,7 @@ fn to_fragment_kind(db: &dyn AstDatabase, id: MacroCallId) -> FragmentKind { MACRO_ITEMS | SOURCE_FILE => FragmentKind::Items, MACRO_STMTS => FragmentKind::Statements, MACRO_PAT => FragmentKind::Pattern, + MACRO_TYPE => FragmentKind::Type, ITEM_LIST => FragmentKind::Items, LET_STMT => { // FIXME: Handle LHS Pattern diff --git a/crates/hir_expand/src/eager.rs b/crates/hir_expand/src/eager.rs index ef126e4ad..a5ac32d3c 100644 --- a/crates/hir_expand/src/eager.rs +++ b/crates/hir_expand/src/eager.rs @@ -31,6 +31,7 @@ use parser::FragmentKind; use std::sync::Arc; use syntax::{algo::SyntaxRewriter, SyntaxNode}; +#[derive(Debug)] pub struct ErrorEmitted { _private: (), } -- cgit v1.2.3