mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Merge #10423
10423: Internal: refactor for mdbook plugin r=Veykril a=HKalbasi This PR is for upstreaming changes that I made for mdbook plugin. Changes are adding inlay hints to `StaticIndex` and changing some functions for working around privacy of crates. Aside this, is it okay if I bring the plugin in tree? It is a simple binary crate. I feel it will better maintained here and become resistant to api changes. Co-authored-by: hamidreza kalbasi <hamidrezakalbasi@protonmail.com>
This commit is contained in:
commit
f185d1c533
3 changed files with 41 additions and 9 deletions
|
@ -25,6 +25,12 @@ impl VfsPath {
|
|||
VfsPath(VfsPathRepr::VirtualPath(VirtualPath(path)))
|
||||
}
|
||||
|
||||
/// Create a path from string. Input should be a string representation of
|
||||
/// an absolute path inside filesystem
|
||||
pub fn new_real_path(path: String) -> VfsPath {
|
||||
VfsPath::from(AbsPathBuf::assert(path.into()))
|
||||
}
|
||||
|
||||
/// Returns the `AbsPath` representation of `self` if `self` is on the file system.
|
||||
pub fn as_path(&self) -> Option<&AbsPath> {
|
||||
match &self.0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue