diff options
| author | bors <bors@rust-lang.org> | 2022-02-11 23:01:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-02-11 23:01:50 +0000 |
| commit | f19851069efd6ee1fe899a469f08ad2d66e76050 (patch) | |
| tree | 82ccc32c3615e9fcbcf040e3c867b0cc527ce739 /library/std/src/sys | |
| parent | e789f3a3a3d96ebf99b7bbd95011527e5be32a11 (diff) | |
| parent | de0feb30bd54fe26e1bb2a0a75ea519708ab8f76 (diff) | |
| download | rust-f19851069efd6ee1fe899a469f08ad2d66e76050.tar.gz rust-f19851069efd6ee1fe899a469f08ad2d66e76050.zip | |
Auto merge of #93921 - matthiaskrgr:rollup-wn3jlxj, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - #90955 (Rename `FilenameTooLong` to `InvalidFilename` and also use it for Windows' `ERROR_INVALID_NAME`) - #91607 (Make `span_extend_to_prev_str()` more robust) - #92895 (Remove some unused functionality) - #93635 (Add missing platform-specific information on current_dir and set_current_dir) - #93660 (rustdoc-json: Add some tests for typealias item) - #93782 (Split `pauth` target feature) - #93868 (Fix incorrect register conflict detection in asm!) - #93888 (Implement `AsFd` for `&T` and `&mut T`.) - #93909 (Fix typo: explicitely -> explicitly) - #93910 (fix mention of moved function in `rustc_hir` docs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/unix/mod.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/windows/mod.rs | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs index 6382354eb6e..605cc499b3c 100644 --- a/library/std/src/sys/unix/mod.rs +++ b/library/std/src/sys/unix/mod.rs @@ -159,7 +159,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind { libc::ENOSPC => StorageFull, libc::ENOSYS => Unsupported, libc::EMLINK => TooManyLinks, - libc::ENAMETOOLONG => FilenameTooLong, + libc::ENAMETOOLONG => InvalidFilename, libc::ENETDOWN => NetworkDown, libc::ENETUNREACH => NetworkUnreachable, libc::ENOTCONN => NotConnected, diff --git a/library/std/src/sys/windows/mod.rs b/library/std/src/sys/windows/mod.rs index c70f254cf39..dc288176346 100644 --- a/library/std/src/sys/windows/mod.rs +++ b/library/std/src/sys/windows/mod.rs @@ -71,6 +71,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind { c::ERROR_FILE_NOT_FOUND => return NotFound, c::ERROR_PATH_NOT_FOUND => return NotFound, c::ERROR_NO_DATA => return BrokenPipe, + c::ERROR_INVALID_NAME => return InvalidFilename, c::ERROR_INVALID_PARAMETER => return InvalidInput, c::ERROR_NOT_ENOUGH_MEMORY | c::ERROR_OUTOFMEMORY => return OutOfMemory, c::ERROR_SEM_TIMEOUT @@ -104,7 +105,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind { c::ERROR_POSSIBLE_DEADLOCK => return Deadlock, c::ERROR_NOT_SAME_DEVICE => return CrossesDevices, c::ERROR_TOO_MANY_LINKS => return TooManyLinks, - c::ERROR_FILENAME_EXCED_RANGE => return FilenameTooLong, + c::ERROR_FILENAME_EXCED_RANGE => return InvalidFilename, _ => {} } |
