mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Treat extern blocks as item containers
This commit is contained in:
parent
b7afb6fc6c
commit
b365b6119c
26 changed files with 216 additions and 164 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue