mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
internal: document diagnostics crate
This commit is contained in:
parent
94f7b63522
commit
4768e5fb23
20 changed files with 85 additions and 63 deletions
|
@ -0,0 +1,16 @@
|
|||
use crate::{Diagnostic, DiagnosticsContext, Severity};
|
||||
|
||||
// Diagnostic: unimplemented-builtin-macro
|
||||
//
|
||||
// This diagnostic is shown for builtin macros which are not yet implemented by rust-analyzer
|
||||
pub(crate) 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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue