From 745e738955e7b1572f970fb25dfb4de9bb61b985 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Thu, 10 Mar 2022 02:36:57 +0000 Subject: [PATCH] fix negative impl assertion on 1.60+ see https://github.com/rust-lang/rust/issues/94791 --- actix-files/src/named.rs | 5 ++--- actix-http/Cargo.toml | 1 + actix-http/src/h1/payload.rs | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/actix-files/src/named.rs b/actix-files/src/named.rs index 7ab29e5c..459670c3 100644 --- a/actix-files/src/named.rs +++ b/actix-files/src/named.rs @@ -210,11 +210,10 @@ impl NamedFile { Self::from_file(file, path) } - #[allow(rustdoc::broken_intra_doc_links)] /// Attempts to open a file asynchronously in read-only mode. /// - /// When the `experimental-io-uring` crate feature is enabled, this will be async. - /// Otherwise, it will be just like [`open`][Self::open]. + /// When the `experimental-io-uring` crate feature is enabled, this will be async. Otherwise, it + /// will behave just like `open`. /// /// # Examples /// ``` diff --git a/actix-http/Cargo.toml b/actix-http/Cargo.toml index 7c928483..a063bd1b 100644 --- a/actix-http/Cargo.toml +++ b/actix-http/Cargo.toml @@ -110,6 +110,7 @@ memchr = "2.4" once_cell = "1.9" rcgen = "0.8" regex = "1.3" +rustversion = "1" rustls-pemfile = "0.2" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" diff --git a/actix-http/src/h1/payload.rs b/actix-http/src/h1/payload.rs index 4d031c15..5a93e905 100644 --- a/actix-http/src/h1/payload.rs +++ b/actix-http/src/h1/payload.rs @@ -263,7 +263,10 @@ mod tests { assert_not_impl_any!(Payload: Send, Sync, UnwindSafe, RefUnwindSafe); assert_impl_all!(Inner: Unpin, Send, Sync); + #[rustversion::before(1.60)] assert_not_impl_any!(Inner: UnwindSafe, RefUnwindSafe); + #[rustversion::since(1.60)] + assert_impl_all!(Inner: UnwindSafe, RefUnwindSafe); #[actix_rt::test] async fn test_unread_data() {