mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-27 10:17:15 +00:00
internal: Restructure some semantics APIs for virtual macro files
This commit is contained in:
parent
f0e39c77cc
commit
38bf4b1fe1
12 changed files with 185 additions and 79 deletions
|
|
@ -39,6 +39,13 @@ impl VfsPath {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn into_abs_path(self) -> Option<AbsPathBuf> {
|
||||
match self.0 {
|
||||
VfsPathRepr::PathBuf(it) => Some(it),
|
||||
VfsPathRepr::VirtualPath(_) => None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Creates a new `VfsPath` with `path` adjoined to `self`.
|
||||
pub fn join(&self, path: &str) -> Option<VfsPath> {
|
||||
match &self.0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue