feat: Make unlinked_file diagnostic quickfixes work for inline modules

This commit is contained in:
Lukas Wirth 2023-01-11 22:39:05 +01:00
parent bb4e272d8a
commit 1ce3e820dc
3 changed files with 202 additions and 42 deletions

View file

@ -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)),