aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-05-31 13:34:01 +0100
committerGitHub <[email protected]>2021-05-31 13:34:01 +0100
commitb8d269990c57634e77f4702afc91041bacb4816a (patch)
treef1d707daa5f4d20abec75299234552b320fa1a42 /crates/ide
parentd7cbb49057c4495307d91f5db32465c29c175124 (diff)
parentcb5454db86bae1e97d86b05607b5c36a89fb749b (diff)
Merge #9060
9060: feat: Diagnose unimplemented built-in macros r=matklad a=jonas-schievink A number of built-in attribute macros are unsupported, I thought it might be useful to put a diagnostic on their definition in libcore. Not sure. Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/ide')
-rw-r--r--crates/ide/src/diagnostics.rs5
1 files changed, 5 insertions, 0 deletions
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(
182 res.borrow_mut() 182 res.borrow_mut()
183 .push(Diagnostic::error(display_range, d.message()).with_code(Some(d.code()))); 183 .push(Diagnostic::error(display_range, d.message()).with_code(Some(d.code())));
184 }) 184 })
185 .on::<hir::diagnostics::UnimplementedBuiltinMacro, _>(|d| {
186 let display_range = sema.diagnostics_display_range(d.display_source()).range;
187 res.borrow_mut()
188 .push(Diagnostic::hint(display_range, d.message()).with_code(Some(d.code())));
189 })
185 // Only collect experimental diagnostics when they're enabled. 190 // Only collect experimental diagnostics when they're enabled.
186 .filter(|diag| !(diag.is_experimental() && config.disable_experimental)) 191 .filter(|diag| !(diag.is_experimental() && config.disable_experimental))
187 .filter(|diag| !config.disabled.contains(diag.code().as_str())); 192 .filter(|diag| !config.disabled.contains(diag.code().as_str()));