@@ -1244,7 +1244,7 @@ impl PathBuf {
1244
1244
///
1245
1245
/// The caller has free choice over the returned lifetime, including 'static.
1246
1246
/// Indeed, this function is ideally used for data that lives for the remainder of
1247
- /// the program’ s life, as dropping the returned reference will cause a memory leak.
1247
+ /// the program' s life, as dropping the returned reference will cause a memory leak.
1248
1248
///
1249
1249
/// It does not reallocate or shrink the `PathBuf`, so the leaked allocation may include
1250
1250
/// unused capacity that is not part of the returned slice. If you want to discard excess
@@ -3028,12 +3028,22 @@ impl Path {
3028
3028
///
3029
3029
/// This function always resolves `..` to the "lexical" parent.
3030
3030
/// That is "a/b/../c" will always resolve to `a/c` which can change the meaning of the path.
3031
- /// In particular, `a/c` and `a/b/../c` are distinct on many systems because `b` may be a symbolic link, so its parent isn’ t `a`.
3031
+ /// In particular, `a/c` and `a/b/../c` are distinct on many systems because `b` may be a symbolic link, so its parent isn' t `a`.
3032
3032
///
3033
3033
/// </div>
3034
3034
///
3035
3035
/// [`path::absolute`](absolute) is an alternative that preserves `..`.
3036
3036
/// Or [`Path::canonicalize`] can be used to resolve any `..` by querying the filesystem.
3037
+ ///
3038
+ /// # Related normalization functions
3039
+ ///
3040
+ /// Besides this method, several other methods perform basic normalization:
3041
+ /// See also: [`Path::components`], [`Path::iter`], [`PartialEq<Path>`], [`PartialOrd<Path>`], [`Ord<Path>`],
3042
+ /// [`Path::has_root`], [`PathBuf::push`]
3043
+ ///
3044
+ /// These methods **do not** resolve `..` components or symlinks. For full normalization including `..`,
3045
+ /// use this method or [`Path::canonicalize`] (which accesses the filesystem).
3046
+ ///
3037
3047
#[ unstable( feature = "normalize_lexically" , issue = "134694" ) ]
3038
3048
pub fn normalize_lexically ( & self ) -> Result < PathBuf , NormalizeError > {
3039
3049
let mut lexical = PathBuf :: new ( ) ;
0 commit comments