diff options
Diffstat (limited to 'crates/ide/src/diagnostics/macro_error.rs')
-rw-r--r-- | crates/ide/src/diagnostics/macro_error.rs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/crates/ide/src/diagnostics/macro_error.rs b/crates/ide/src/diagnostics/macro_error.rs index 8cc8cfb48..d76a3a094 100644 --- a/crates/ide/src/diagnostics/macro_error.rs +++ b/crates/ide/src/diagnostics/macro_error.rs | |||
@@ -14,7 +14,12 @@ pub(super) fn macro_error(ctx: &DiagnosticsContext<'_>, d: &hir::MacroError) -> | |||
14 | 14 | ||
15 | #[cfg(test)] | 15 | #[cfg(test)] |
16 | mod tests { | 16 | mod tests { |
17 | use crate::diagnostics::tests::{check_diagnostics, check_no_diagnostics}; | 17 | use crate::{ |
18 | diagnostics::tests::{ | ||
19 | check_diagnostics, check_diagnostics_with_config, check_no_diagnostics, | ||
20 | }, | ||
21 | DiagnosticsConfig, | ||
22 | }; | ||
18 | 23 | ||
19 | #[test] | 24 | #[test] |
20 | fn builtin_macro_fails_expansion() { | 25 | fn builtin_macro_fails_expansion() { |
@@ -31,7 +36,14 @@ macro_rules! include { () => {} } | |||
31 | 36 | ||
32 | #[test] | 37 | #[test] |
33 | fn include_macro_should_allow_empty_content() { | 38 | fn include_macro_should_allow_empty_content() { |
34 | check_diagnostics( | 39 | let mut config = DiagnosticsConfig::default(); |
40 | |||
41 | // FIXME: This is a false-positive, the file is actually linked in via | ||
42 | // `include!` macro | ||
43 | config.disabled.insert("unlinked-file".to_string()); | ||
44 | |||
45 | check_diagnostics_with_config( | ||
46 | config, | ||
35 | r#" | 47 | r#" |
36 | //- /lib.rs | 48 | //- /lib.rs |
37 | #[rustc_builtin_macro] | 49 | #[rustc_builtin_macro] |