mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Fix detection of macro file in inactive-code diag
This commit is contained in:
parent
1b02cafa43
commit
260936d0b7
2 changed files with 5 additions and 1 deletions
|
@ -173,6 +173,10 @@ impl HirFileId {
|
|||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_macro(self) -> bool {
|
||||
matches!(self.0, HirFileIdRepr::MacroFile(_))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue