mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
feat: Make unlinked_file diagnostic quickfixes work for inline modules
This commit is contained in:
parent
bb4e272d8a
commit
1ce3e820dc
3 changed files with 202 additions and 42 deletions
|
@ -356,6 +356,14 @@ impl HirFileId {
|
|||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn file_id(self) -> Option<FileId> {
|
||||
match self.0 & Self::MACRO_FILE_TAG_MASK {
|
||||
0 => Some(FileId(self.0)),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn repr(self) -> HirFileIdRepr {
|
||||
match self.0 & Self::MACRO_FILE_TAG_MASK {
|
||||
0 => HirFileIdRepr::FileId(FileId(self.0)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue