2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2288,7 +2288,7 @@ impl AsInnerMut<fs_imp::DirBuilder> for DirBuilder {
2288
2288
/// This function will traverse symbolic links to query information about the
2289
2289
/// destination file. In case of broken symbolic links this will return `Ok(false)`.
2290
2290
///
2291
- /// As opposed to the ` exists()` method, this one doesn't silently ignore errors
2291
+ /// As opposed to the [`Path:: exists`] method, this one doesn't silently ignore errors
2292
2292
/// unrelated to the path not existing. (E.g. it will return `Err(_)` in case of permission
2293
2293
/// denied on some of the parent directories.)
2294
2294
///
@@ -2301,6 +2301,8 @@ impl AsInnerMut<fs_imp::DirBuilder> for DirBuilder {
2301
2301
/// assert!(!fs::try_exists("does_not_exist.txt").expect("Can't check existence of file does_not_exist.txt"));
2302
2302
/// assert!(fs::try_exists("/root/secret_file.txt").is_err());
2303
2303
/// ```
2304
+ ///
2305
+ /// [`Path::exists`]: crate::path::Path::exists
2304
2306
// FIXME: stabilization should modify documentation of `exists()` to recommend this method
2305
2307
// instead.
2306
2308
#[ unstable( feature = "path_try_exists" , issue = "83186" ) ]
Original file line number Diff line number Diff line change @@ -2730,7 +2730,7 @@ impl Path {
2730
2730
/// This function will traverse symbolic links to query information about the
2731
2731
/// destination file. In case of broken symbolic links this will return `Ok(false)`.
2732
2732
///
2733
- /// As opposed to the `exists()` method, this one doesn't silently ignore errors
2733
+ /// As opposed to the [ `exists()`] method, this one doesn't silently ignore errors
2734
2734
/// unrelated to the path not existing. (E.g. it will return `Err(_)` in case of permission
2735
2735
/// denied on some of the parent directories.)
2736
2736
///
@@ -2743,6 +2743,8 @@ impl Path {
2743
2743
/// assert!(!Path::new("does_not_exist.txt").try_exists().expect("Can't check existence of file does_not_exist.txt"));
2744
2744
/// assert!(Path::new("/root/secret_file.txt").try_exists().is_err());
2745
2745
/// ```
2746
+ ///
2747
+ /// [`exists()`]: Self::exists
2746
2748
// FIXME: stabilization should modify documentation of `exists()` to recommend this method
2747
2749
// instead.
2748
2750
#[ unstable( feature = "path_try_exists" , issue = "83186" ) ]
0 commit comments