Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide_diagnostics/src/handlers/incorrect_case.rs')
| -rw-r--r-- | crates/ide_diagnostics/src/handlers/incorrect_case.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/ide_diagnostics/src/handlers/incorrect_case.rs b/crates/ide_diagnostics/src/handlers/incorrect_case.rs index 6990b19cf3..3206a63a90 100644 --- a/crates/ide_diagnostics/src/handlers/incorrect_case.rs +++ b/crates/ide_diagnostics/src/handlers/incorrect_case.rs @@ -398,6 +398,24 @@ extern { } #[test] + fn ignores_extern_items_from_macro() { + check_diagnostics( + r#" +macro_rules! m { + () => { + fn NonSnakeCaseName(SOME_VAR: u8) -> u8; + pub static SomeStatic: u8 = 10; + } +} + +extern { + m!(); +} + "#, + ); + } + + #[test] fn bug_traits_arent_checked() { // FIXME: Traits and functions in traits aren't currently checked by // r-a, even though rustc will complain about them. |