2021-06-14 05:15:05 -05:00
|
|
|
use crate::{Diagnostic, DiagnosticsContext, Severity};
|
2021-06-13 11:35:30 -05:00
|
|
|
|
|
|
|
// Diagnostic: unimplemented-builtin-macro
|
|
|
|
//
|
|
|
|
// This diagnostic is shown for builtin macros which are not yet implemented by rust-analyzer
|
2021-06-14 11:32:39 -05:00
|
|
|
pub(crate) fn unimplemented_builtin_macro(
|
2021-06-13 11:35:30 -05:00
|
|
|
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)
|
|
|
|
}
|