aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/diagnostics/unimplemented_builtin_macro.rs
blob: 09faa3bbc714f18c02d4c59873bf135f924a513d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use crate::{
    diagnostics::{Diagnostic, DiagnosticsContext},
    Severity,
};

// Diagnostic: unimplemented-builtin-macro
//
// This diagnostic is shown for builtin macros which are not yet implemented by rust-analyzer
pub(super) fn unimplemented_builtin_macro(
    ctx: &DiagnosticsContext<'_>,
    d: &hir::UnimplementedBuiltinMacro,
) -> Diagnostic {
    Diagnostic::new(
        "unimplemented-builtin-macro",
        "unimplemented built-in macro".to_string(),
        ctx.sema.diagnostics_display_range(d.node.clone()).range,
    )
    .severity(Severity::WeakWarning)
}