mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Merge commit '37f84c101b
' into sync-from-ra
This commit is contained in:
parent
6502421771
commit
4704881b64
311 changed files with 13700 additions and 9110 deletions
|
@ -6,7 +6,7 @@
|
|||
use std::{
|
||||
borrow::Borrow,
|
||||
ffi::OsStr,
|
||||
ops,
|
||||
fmt, ops,
|
||||
path::{Component, Path, PathBuf},
|
||||
};
|
||||
|
||||
|
@ -95,6 +95,12 @@ impl AbsPathBuf {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for AbsPathBuf {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
fmt::Display::fmt(&self.0.display(), f)
|
||||
}
|
||||
}
|
||||
|
||||
/// Wrapper around an absolute [`Path`].
|
||||
#[derive(Debug, Ord, PartialOrd, Eq, PartialEq, Hash)]
|
||||
#[repr(transparent)]
|
||||
|
@ -217,6 +223,7 @@ impl AbsPath {
|
|||
pub fn as_os_str(&self) -> &OsStr {
|
||||
self.0.as_os_str()
|
||||
}
|
||||
#[deprecated(note = "use Display instead")]
|
||||
pub fn display(&self) -> std::path::Display<'_> {
|
||||
self.0.display()
|
||||
}
|
||||
|
@ -227,6 +234,12 @@ impl AbsPath {
|
|||
// endregion:delegate-methods
|
||||
}
|
||||
|
||||
impl fmt::Display for AbsPath {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
fmt::Display::fmt(&self.0.display(), f)
|
||||
}
|
||||
}
|
||||
|
||||
/// Wrapper around a relative [`PathBuf`].
|
||||
#[derive(Debug, Clone, Ord, PartialOrd, Eq, PartialEq, Hash)]
|
||||
pub struct RelPathBuf(PathBuf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue