aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/diagnostics/unimplemented_builtin_macro.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-06-13 18:07:04 +0100
committerGitHub <[email protected]>2021-06-13 18:07:04 +0100
commit60ca03e8aa00956d1511969da5f1844a02483bc9 (patch)
tree7729eb4ae1ef7a4cf0e0be42dfc2ef36c65cec1e /crates/ide/src/diagnostics/unimplemented_builtin_macro.rs
parent8e5f469da8d5ed0e4c0519c883498097aeadd7ac (diff)
parent8d391ec981562785ec92ce3afe950972c523f925 (diff)
Merge #9252
9252: internal: refactor mismatched args count diagnostic r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide/src/diagnostics/unimplemented_builtin_macro.rs')
-rw-r--r--crates/ide/src/diagnostics/unimplemented_builtin_macro.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/crates/ide/src/diagnostics/unimplemented_builtin_macro.rs b/crates/ide/src/diagnostics/unimplemented_builtin_macro.rs
new file mode 100644
index 000000000..09faa3bbc
--- /dev/null
+++ b/crates/ide/src/diagnostics/unimplemented_builtin_macro.rs
@@ -0,0 +1,19 @@
1use crate::{
2 diagnostics::{Diagnostic, DiagnosticsContext},
3 Severity,
4};
5
6// Diagnostic: unimplemented-builtin-macro
7//
8// This diagnostic is shown for builtin macros which are not yet implemented by rust-analyzer
9pub(super) fn unimplemented_builtin_macro(
10 ctx: &DiagnosticsContext<'_>,
11 d: &hir::UnimplementedBuiltinMacro,
12) -> Diagnostic {
13 Diagnostic::new(
14 "unimplemented-builtin-macro",
15 "unimplemented built-in macro".to_string(),
16 ctx.sema.diagnostics_display_range(d.node.clone()).range,
17 )
18 .severity(Severity::WeakWarning)
19}