@@ -408,7 +408,9 @@ impl File {
408408 ///
409409 /// This function will create a file if it does not exist, or return an error if it does. This
410410 /// way, if the call succeeds, the file returned is guaranteed to be new.
411- /// If a file exists at the target location before, creating file will fail with [`AlreadyExists`].
411+ /// If a file exists at the target location, creating a new file will fail with [`AlreadyExists`]
412+ /// or another error based on the situation. See [`OpenOptions::open`] for a
413+ /// non-exhaustive list of likely errors.
412414 ///
413415 /// This option is useful because it is atomic. Otherwise between checking whether a file
414416 /// exists and creating a new one, the file may have been created by another process (a TOCTOU
@@ -1074,7 +1076,9 @@ impl OpenOptions {
10741076 ///
10751077 /// No file is allowed to exist at the target location, also no (dangling) symlink. In this
10761078 /// way, if the call succeeds, the file returned is guaranteed to be new.
1077- /// If a file exists at the target location before, creating file will fail with [`AlreadyExists`].
1079+ /// If a file exists at the target location, creating a new file will fail with [`AlreadyExists`]
1080+ /// or another error based on the situation. See [`OpenOptions::open`] for a
1081+ /// non-exhaustive list of likely errors.
10781082 ///
10791083 /// This option is useful because it is atomic. Otherwise between checking
10801084 /// whether a file exists and creating a new one, the file may have been
0 commit comments