ide_diagnostics/handlers/unimplemented_builtin_macro.rs
1use crate::{Diagnostic, DiagnosticCode, DiagnosticsContext, Severity};
2
3// Diagnostic: unimplemented-builtin-macro
4//
5// This diagnostic is shown for builtin macros which are not yet implemented by rust-analyzer
6pub(crate) fn unimplemented_builtin_macro(
7 ctx: &DiagnosticsContext<'_>,
8 d: &hir::UnimplementedBuiltinMacro,
9) -> Diagnostic {
10 Diagnostic::new_with_syntax_node_ptr(
11 ctx,
12 DiagnosticCode::Ra("unimplemented-builtin-macro", Severity::WeakWarning),
13 "unimplemented built-in macro".to_owned(),
14 d.node,
15 )
16 .stable()
17}