From cb5454db86bae1e97d86b05607b5c36a89fb749b Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Sun, 30 May 2021 04:19:47 +0200 Subject: Diagnose unimplemented built-in macros --- crates/hir_def/src/nameres/diagnostics.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'crates/hir_def/src/nameres/diagnostics.rs') diff --git a/crates/hir_def/src/nameres/diagnostics.rs b/crates/hir_def/src/nameres/diagnostics.rs index 57c36c3c6..95061f601 100644 --- a/crates/hir_def/src/nameres/diagnostics.rs +++ b/crates/hir_def/src/nameres/diagnostics.rs @@ -27,6 +27,8 @@ pub enum DefDiagnosticKind { UnresolvedMacroCall { ast: AstId, path: ModPath }, MacroError { ast: MacroCallKind, message: String }, + + UnimplementedBuiltinMacro { ast: AstId }, } #[derive(Debug, PartialEq, Eq)] @@ -93,4 +95,11 @@ impl DefDiagnostic { ) -> Self { Self { in_module: container, kind: DefDiagnosticKind::UnresolvedMacroCall { ast, path } } } + + pub(super) fn unimplemented_builtin_macro( + container: LocalModuleId, + ast: AstId, + ) -> Self { + Self { in_module: container, kind: DefDiagnosticKind::UnimplementedBuiltinMacro { ast } } + } } -- cgit v1.2.3