1
Fork 0

Rollup merge of #134076 - GrigorenkoPV:InvalidFilename, r=joboet

Stabilize `std::io::ErrorKind::InvalidFilename`

FCP complete: https://github.com/rust-lang/rust/issues/130192#issuecomment-2674989358

Tracking issues: #86442 & #130192

This PR:
- Stabilizes `InvalidFilename` without changing its name to `InvalidFileName`.
- Fixes the doc comment (https://github.com/rust-lang/rust/issues/130192#issuecomment-2429534640)
- Does not separate "the name is too long" case into a separate `ErrorKind`. That case is currently documented to be covered by `InvalidFilename` in the doc. I'm not sure if it would be possible to change this later or if that would be an unacceptable breaking change.
- Does not map more raw OS errors to this `ErrorKind` (as suggested in https://github.com/rust-lang/rust/issues/86442#issuecomment-1441709738). This can presumably be addressed later.
This commit is contained in:
Manish Goregaokar 2025-03-12 10:19:25 -07:00 committed by GitHub
commit 185dd2d01b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -373,8 +373,8 @@ pub enum ErrorKind {
TooManyLinks, TooManyLinks,
/// A filename was invalid. /// A filename was invalid.
/// ///
/// This error can also cause if it exceeded the filename length limit. /// This error can also occur if a length limit for a name was exceeded.
#[unstable(feature = "io_error_more", issue = "86442")] #[stable(feature = "io_error_invalid_filename", since = "CURRENT_RUSTC_VERSION")]
InvalidFilename, InvalidFilename,
/// Program argument list too long. /// Program argument list too long.
/// ///