From cb5454db86bae1e97d86b05607b5c36a89fb749b Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Sun, 30 May 2021 04:19:47 +0200 Subject: Diagnose unimplemented built-in macros --- crates/ide/src/diagnostics.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crates/ide') diff --git a/crates/ide/src/diagnostics.rs b/crates/ide/src/diagnostics.rs index 6cf5810fa..d5c954b8b 100644 --- a/crates/ide/src/diagnostics.rs +++ b/crates/ide/src/diagnostics.rs @@ -182,6 +182,11 @@ pub(crate) fn diagnostics( res.borrow_mut() .push(Diagnostic::error(display_range, d.message()).with_code(Some(d.code()))); }) + .on::(|d| { + let display_range = sema.diagnostics_display_range(d.display_source()).range; + res.borrow_mut() + .push(Diagnostic::hint(display_range, d.message()).with_code(Some(d.code()))); + }) // Only collect experimental diagnostics when they're enabled. .filter(|diag| !(diag.is_experimental() && config.disable_experimental)) .filter(|diag| !config.disabled.contains(diag.code().as_str())); -- cgit v1.2.3