Rollup merge of #131462 - cuviper:open_buffered-error, r=RalfJung · qinheping/verify-rust-std@36a90d7 (original) (raw)
Navigation Menu
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 36a90d7
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.
File tree
1 file changed
lines changed
1 file changed
lines changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -394,7 +394,8 @@ impl File { | ||
| 394 | 394 | /// |
| 395 | 395 | /// # Errors |
| 396 | 396 | /// |
| 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. | |
| 398 | 399 | /// Other errors may also be returned according to [`OpenOptions::open`]. |
| 399 | 400 | /// |
| 400 | 401 | /// # Examples |