Treat extern blocks as item containers

This commit is contained in:
Jonas Schievink 2021-12-07 17:31:26 +01:00
parent b7afb6fc6c
commit b365b6119c
26 changed files with 216 additions and 164 deletions

View file

@ -397,6 +397,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