mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Document vfs public items
This commit is contained in:
parent
52fa926f00
commit
311ec70d03
5 changed files with 204 additions and 2 deletions
|
@ -26,14 +26,24 @@
|
|||
//! from the anchor than.
|
||||
use crate::FileId;
|
||||
|
||||
/// Path relative to a file.
|
||||
///
|
||||
/// Owned version of [`AnchoredPath`].
|
||||
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||
pub struct AnchoredPathBuf {
|
||||
/// File that this path is relative to.
|
||||
pub anchor: FileId,
|
||||
/// Path relative to `anchor`'s containing directory.
|
||||
pub path: String,
|
||||
}
|
||||
|
||||
/// Path relative to a file.
|
||||
///
|
||||
/// Borrowed version of [`AnchoredPathBuf`].
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
|
||||
pub struct AnchoredPath<'a> {
|
||||
/// File that this path is relative to.
|
||||
pub anchor: FileId,
|
||||
/// Path relative to `anchor`'s containing directory.
|
||||
pub path: &'a str,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue