Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs')
| -rw-r--r-- | crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs b/crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs index d1c3d1c5df..81ea442e9e 100644 --- a/crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs +++ b/crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs @@ -539,4 +539,21 @@ pub fn repro<T: A>() { "#, ); } + + #[test] + fn cfg_inside_macro_inside_arg() { + check_diagnostics( + r#" +fn foo() {} + +macro_rules! make_X { + () => { #[cfg(false)] X }; +} + +fn main() { + foo(make_X!()); +} + "#, + ); + } } |