about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-09-25 02:06:55 +0000
committerbors <bors@rust-lang.org>2024-09-25 02:06:55 +0000
commit1b5aa96d6016bafe50e071b45d4d2e3c90fd766f (patch)
tree4a859a69ea03e9d2cb552fe9bb29ae67059486a9 /library/std/src
parent3f99982c633dbca746140db60ed52ba7fa112803 (diff)
parent9737f923e2de6e66a692a4c260ed5313ff399386 (diff)
downloadrust-1b5aa96d6016bafe50e071b45d4d2e3c90fd766f.tar.gz
rust-1b5aa96d6016bafe50e071b45d4d2e3c90fd766f.zip
Auto merge of #130807 - tgross35:rollup-p304vzf, r=tgross35
Rollup of 7 pull requests

Successful merges:

 - #130234 (improve compile errors for invalid ptr-to-ptr casts with trait objects)
 - #130752 (Improve assembly test for CMSE ABIs)
 - #130764 (Separate collection of crate-local inherent impls from error tracking)
 - #130788 (Pin memchr to 2.5.0 in the library rather than rustc_ast)
 - #130789 (add InProgress ErrorKind gated behind io_error_inprogress feature)
 - #130793 (Mention `COMPILETEST_VERBOSE_CRASHES` on crash test failure)
 - #130798 (rustdoc: inherit parent's stability where applicable)

Failed merges:

 - #130735 (Simple validation for unsize coercion in MIR validation)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/io/error.rs6
-rw-r--r--library/std/src/io/error/repr_bitpacked.rs1
-rw-r--r--library/std/src/sys/pal/unix/mod.rs1
3 files changed, 8 insertions, 0 deletions
diff --git a/library/std/src/io/error.rs b/library/std/src/io/error.rs
index 6ecd9469c17..795cc64e957 100644
--- a/library/std/src/io/error.rs
+++ b/library/std/src/io/error.rs
@@ -400,6 +400,11 @@ pub enum ErrorKind {
     #[stable(feature = "out_of_memory_error", since = "1.54.0")]
     OutOfMemory,
 
+    /// The operation was partially successful and needs to be checked
+    /// later on due to not blocking.
+    #[unstable(feature = "io_error_inprogress", issue = "none")]
+    InProgress,
+
     // "Unusual" error kinds which do not correspond simply to (sets
     // of) OS error codes, should be added just above this comment.
     // `Other` and `Uncategorized` should remain at the end:
@@ -449,6 +454,7 @@ impl ErrorKind {
             FilesystemQuotaExceeded => "filesystem quota exceeded",
             HostUnreachable => "host unreachable",
             Interrupted => "operation interrupted",
+            InProgress => "in progress",
             InvalidData => "invalid data",
             InvalidFilename => "invalid filename",
             InvalidInput => "invalid input parameter",
diff --git a/library/std/src/io/error/repr_bitpacked.rs b/library/std/src/io/error/repr_bitpacked.rs
index 9d3ade46bd9..80ba8455df3 100644
--- a/library/std/src/io/error/repr_bitpacked.rs
+++ b/library/std/src/io/error/repr_bitpacked.rs
@@ -348,6 +348,7 @@ fn kind_from_prim(ek: u32) -> Option<ErrorKind> {
         UnexpectedEof,
         Unsupported,
         OutOfMemory,
+        InProgress,
         Uncategorized,
     })
 }
diff --git a/library/std/src/sys/pal/unix/mod.rs b/library/std/src/sys/pal/unix/mod.rs
index 1c9159e5fba..0d63b1119d5 100644
--- a/library/std/src/sys/pal/unix/mod.rs
+++ b/library/std/src/sys/pal/unix/mod.rs
@@ -279,6 +279,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
         libc::ETIMEDOUT => TimedOut,
         libc::ETXTBSY => ExecutableFileBusy,
         libc::EXDEV => CrossesDevices,
+        libc::EINPROGRESS => InProgress,
 
         libc::EACCES | libc::EPERM => PermissionDenied,