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, 6 insertions, 0 deletions
diff --git a/crates/ide_diagnostics/src/handlers/macro_error.rs b/crates/ide_diagnostics/src/handlers/macro_error.rs index 356f089b22..43b525133f 100644 --- a/crates/ide_diagnostics/src/handlers/macro_error.rs +++ b/crates/ide_diagnostics/src/handlers/macro_error.rs @@ -26,8 +26,14 @@ mod tests { #[rustc_builtin_macro] macro_rules! include { () => {} } +#[rustc_builtin_macro] +macro_rules! compile_error { () => {} } + include!("doesntexist"); //^^^^^^^^^^^^^^^^^^^^^^^^ error: failed to load file `doesntexist` + + compile_error!("compile_error macro works"); +//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: compile_error macro works "#, ); } |