mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 17:36:20 +00:00
Improve OpenOptions append+truncate error message Fixes rust-lang/rust#160716. When `OpenOptions` is configured with both `append(true)` and `truncate(true)`, the previous `InvalidInput` error message was: > creating or truncating a file requires write or append access This message is misleading because `append(true)` already provides append access. This change replaces it with a more descriptive error message indicating that `append` and `truncate` cannot both be enabled at the same time. The corresponding platform-specific tests have been updated to verify the new error message and ensure consistent behavior across the relevant implementations.