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.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ide-diagnostics/src/handlers/macro_error.rs b/crates/ide-diagnostics/src/handlers/macro_error.rs index 2f13298589..a2648a1995 100644 --- a/crates/ide-diagnostics/src/handlers/macro_error.rs +++ b/crates/ide-diagnostics/src/handlers/macro_error.rs @@ -38,8 +38,8 @@ pub(crate) fn macro_def_error(ctx: &DiagnosticsContext<'_>, d: &hir::MacroDefErr #[cfg(test)] mod tests { use crate::{ - tests::{check_diagnostics, check_diagnostics_with_config}, DiagnosticsConfig, + tests::{check_diagnostics, check_diagnostics_with_config}, }; #[test] @@ -123,6 +123,7 @@ include!("foo/bar.rs"); #[test] fn good_out_dir_diagnostic() { + // FIXME: The diagnostic here is duplicated for each eager expansion check_diagnostics( r#" #[rustc_builtin_macro] @@ -134,6 +135,8 @@ macro_rules! concat { () => {} } include!(concat!(env!("OUT_DIR"), "/out.rs")); //^^^^^^^^^ error: `OUT_DIR` not set, build scripts may have failed to run + //^^^^^^^^^^^^^^^ error: `OUT_DIR` not set, build scripts may have failed to run + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `OUT_DIR` not set, build scripts may have failed to run "#, ); } @@ -238,6 +241,7 @@ macro_rules! outer { fn f() { outer!(); } //^^^^^^^^ error: leftover tokens + //^^^^^^^^ error: Syntax Error in Expansion: expected expression "#, ) } |