rust/crates/ide/src/diagnostics/unimplemented_builtin_macro.rs

20 lines
580 B
Rust
Raw Normal View History

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)
}