Rollup merge of #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.
This commit is contained in:
Matthias Krüger 2024-10-09 23:03:50 +02:00 committed by GitHub
commit 7a76489454
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -394,7 +394,8 @@ pub fn open<P: AsRef<Path>>(path: P) -> io::Result<File> {
///
/// # Errors
///
/// This function will return an error if `path` does not already exist.
/// This function will return an error if `path` does not already exist,
/// or if memory allocation fails for the new buffer.
/// Other errors may also be returned according to [`OpenOptions::open`].
///
/// # Examples