@@ -3090,7 +3090,7 @@ impl Path {
3090
3090
/// Returns `true` if the path points at an existing entity.
3091
3091
///
3092
3092
/// Warning: this method may be error-prone, consider using [`try_exists()`] instead!
3093
- /// It also has a risk of introducing time-of-check to time-of-use (TOCTOU) bugs.
3093
+ /// It also has a risk of introducing time-of-check to time-of-use ([ TOCTOU] ) bugs.
3094
3094
///
3095
3095
/// This function will traverse symbolic links to query information about the
3096
3096
/// destination file.
@@ -3111,6 +3111,7 @@ impl Path {
3111
3111
/// check errors, call [`Path::try_exists`].
3112
3112
///
3113
3113
/// [`try_exists()`]: Self::try_exists
3114
+ /// [TOCTOU]: fs#time-of-check-to-time-of-use-toctou
3114
3115
#[ stable( feature = "path_ext" , since = "1.5.0" ) ]
3115
3116
#[ must_use]
3116
3117
#[ inline]
@@ -3130,7 +3131,7 @@ impl Path {
3130
3131
/// permission is denied on one of the parent directories.
3131
3132
///
3132
3133
/// Note that while this avoids some pitfalls of the `exists()` method, it still can not
3133
- /// prevent time-of-check to time-of-use (TOCTOU) bugs. You should only use it in scenarios
3134
+ /// prevent time-of-check to time-of-use ([ TOCTOU] ) bugs. You should only use it in scenarios
3134
3135
/// where those bugs are not an issue.
3135
3136
///
3136
3137
/// This is an alias for [`std::fs::exists`](crate::fs::exists).
@@ -3143,6 +3144,7 @@ impl Path {
3143
3144
/// assert!(Path::new("/root/secret_file.txt").try_exists().is_err());
3144
3145
/// ```
3145
3146
///
3147
+ /// [TOCTOU]: fs#time-of-check-to-time-of-use-toctou
3146
3148
/// [`exists()`]: Self::exists
3147
3149
#[ stable( feature = "path_try_exists" , since = "1.63.0" ) ]
3148
3150
#[ inline]
0 commit comments