X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=library%2Fstd%2Fsrc%2Fio%2Ferror.rs;h=1aa6d657889129c0fedae5aa4ce0c7472c8a9843;hb=f1c918f1f3166c1cb2624ce2e2783d357e70dc3d;hp=4b55324a2424cf45d424e44154b291db5ed3bd20;hpb=7d5e2ac5eb78c5d3054267bbec5c31fcf8193507;p=rust.git diff --git a/library/std/src/io/error.rs b/library/std/src/io/error.rs index 4b55324a242..1aa6d657889 100644 --- a/library/std/src/io/error.rs +++ b/library/std/src/io/error.rs @@ -296,12 +296,11 @@ pub enum ErrorKind { /// The filesystem does not support making so many hardlinks to the same file. #[unstable(feature = "io_error_more", issue = "86442")] TooManyLinks, - /// Filename too long. + /// A filename was invalid. /// - /// The limit might be from the underlying filesystem or API, or an administratively imposed - /// resource limit. + /// This error can also cause if it exceeded the filename length limit. #[unstable(feature = "io_error_more", issue = "86442")] - FilenameTooLong, + InvalidFilename, /// Program argument list too long. /// /// When trying to run an external program, a system or process limit on the size of the @@ -382,12 +381,12 @@ pub(crate) fn as_str(&self) -> &'static str { DirectoryNotEmpty => "directory not empty", ExecutableFileBusy => "executable file busy", FileTooLarge => "file too large", - FilenameTooLong => "filename too long", FilesystemLoop => "filesystem loop or indirection limit (e.g. symlink loop)", FilesystemQuotaExceeded => "filesystem quota exceeded", HostUnreachable => "host unreachable", Interrupted => "operation interrupted", InvalidData => "invalid data", + InvalidFilename => "invalid filename", InvalidInput => "invalid input parameter", IsADirectory => "is a directory", NetworkDown => "network down",