Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-diagnostics/src/handlers/macro_error.rs')
-rw-r--r--crates/ide-diagnostics/src/handlers/macro_error.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ide-diagnostics/src/handlers/macro_error.rs b/crates/ide-diagnostics/src/handlers/macro_error.rs
index 2cd6a71c00..702fba448a 100644
--- a/crates/ide-diagnostics/src/handlers/macro_error.rs
+++ b/crates/ide-diagnostics/src/handlers/macro_error.rs
@@ -7,7 +7,10 @@ pub(crate) fn macro_error(ctx: &DiagnosticsContext<'_>, d: &hir::MacroError) ->
// Use more accurate position if available.
let display_range = ctx.resolve_precise_location(&d.node, d.precise_location);
Diagnostic::new(
- DiagnosticCode::Ra("macro-error", Severity::Error),
+ DiagnosticCode::Ra(
+ "macro-error",
+ if d.error { Severity::Error } else { Severity::WeakWarning },
+ ),
d.message.clone(),
display_range,
)