Skip to content

Commit 36a90d7

Browse files
authored
Rollup merge of rust-lang#131462 - cuviper:open_buffered-error, r=RalfJung
Mention allocation errors for `open_buffered` This documents that `File::open_buffered` may return an error on allocation failure.
2 parents 49220cd + db9377d commit 36a90d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

std/src/fs.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,8 @@ impl File {
394394
///
395395
/// # Errors
396396
///
397-
/// This function will return an error if `path` does not already exist.
397+
/// This function will return an error if `path` does not already exist,
398+
/// or if memory allocation fails for the new buffer.
398399
/// Other errors may also be returned according to [`OpenOptions::open`].
399400
///
400401
/// # Examples

0 commit comments

Comments
 (0)