Repository: bearcove/loona (language: rust)

Issue:
Upgrade to 2023-10-18
The clippy fix for spurious "needless mutable ref" warning has been merged, and stuff is happening re: async fn in trait that we should follow closely (to eventually build on stable)


Discussion / hints:
Update: bumped the version we should be targeting as we should no longer need the feature flags for AFIT and RPITIT.

Fix patch:
diff --git a/crates/fluke-buffet/src/lib.rs b/crates/fluke-buffet/src/lib.rs
index bb47ef12..2713d827 100644
--- a/crates/fluke-buffet/src/lib.rs
+++ b/crates/fluke-buffet/src/lib.rs
@@ -1,6 +1,5 @@
 #![allow(incomplete_features)]
 #![feature(thread_local)]
-#![feature(async_fn_in_trait)]
 
 mod roll;
 pub use roll::*;
diff --git a/crates/fluke-maybe-uring/src/io.rs b/crates/fluke-maybe-uring/src/io.rs
index 9045ea71..23f72154 100644
--- a/crates/fluke-maybe-uring/src/io.rs
+++ b/crates/fluke-maybe-uring/src/io.rs
@@ -12,10 +12,12 @@ use buf_or_slice::*;
 mod non_uring;
 pub use non_uring::*;
 
+#[allow(async_fn_in_trait)] // we never require Send
 pub trait ReadOwned {
     async fn read<B: IoBufMut>(&mut self, buf: B) -> BufResult<usize, B>;
 }
 
+#[allow(async_fn_in_trait)] // we never require Send
 pub trait WriteOwned {
     /// Write a single buffer, taking ownership for the duration of the write.
     /// Might perform a partial write, see [WriteOwned::write_all]
diff --git a/crates/fluke-maybe-uring/src/lib.rs b/crates/fluke-maybe-uring/src/lib.rs
index c3861609..0884836b 100644
--- a/crates/fluke-maybe-uring/src/lib.rs
+++ b/crates/fluke-maybe-uring/src/lib.rs
@@ -1,5 +1,4 @@
 #![allow(incomplete_features)]
-#![feature(async_fn_in_trait)]
 
 use std::future::Future;
 
diff --git a/crates/fluke/src/h1/client.rs b/crates/fluke/src/h1/client.rs
index 72cff7ab..5c720b5c 100644
--- a/crates/fluke/src/h1/client.rs
+++ b/crates/fluke/src/h1/client.rs
@@ -13,6 +13,7 @@ use super::{
 
 pub struct ClientConf {}
 
+#[allow(async_fn_in_trait)] // we never require Send
 pub trait ClientDriver {
     type Return;
 
diff --git a/crates/fluke/src/lib.rs b/crates/fluke/src/lib.rs
index 8c6457ad..9c6c0d1b 100644
--- a/crates/fluke/src/lib.rs
+++ b/crates/fluke/src/lib.rs
@@ -1,7 +1,5 @@
 #![allow(incomplete_features)]
 #![feature(type_alias_impl_trait)]
-#![feature(async_fn_in_trait)]
-#![feature(return_position_impl_trait_in_trait)]
 
 mod util;
 
@@ -20,6 +18,7 @@ pub use fluke_maybe_uring as maybe_uring;
 /// re-exported so consumers can use whatever forked version we use
 pub use http;
 
+#[allow(async_fn_in_trait)] // we never require Send
 pub trait ServerDriver {
     async fn handle<E: Encoder>(
         &self,
diff --git a/crates/fluke/src/responder.rs b/crates/fluke/src/responder.rs
index ccab0c87..7163eddb 100644
--- a/crates/fluke/src/responder.rs
+++ b/crates/fluke/src/responder.rs
@@ -155,6 +155,7 @@ where
     }
 }
 
+#[allow(async_fn_in_trait)] // we never require Send
 pub trait Encoder {
     async fn write_response(&mut self, res: Response) -> eyre::Result<()>;
     async fn write_body_chunk(&mut self, chunk: Piece, mode: BodyWriteMode) -> eyre::Result<()>;
diff --git a/crates/fluke/src/types/mod.rs b/crates/fluke/src/types/mod.rs
index 81abc0d8..7c51770a 100644
--- a/crates/fluke/src/types/mod.rs
+++ b/crates/fluke/src/types/mod.rs
@@ -177,6 +177,7 @@ impl BodyErrorReason {
     }
 }
 
+#[allow(async_fn_in_trait)] // we never require Send
 pub trait Body: Debug
 where
     Self: Sized,
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
index f77b25d0..c1e9523d 100644
--- a/rust-toolchain.toml
+++ b/rust-toolchain.toml
@@ -1,3 +1,3 @@
 [toolchain]
-channel = "nightly-2023-10-02"
-components = ["llvm-tools-preview"]
+channel = "nightly-2023-10-18"
+components = ["llvm-tools"]


Test patch:
diff --git a/test-crates/fluke-curl-tests/tests/integration_test.rs b/test-crates/fluke-curl-tests/tests/integration_test.rs
index 2e9a52ea..3de3f362 100644
--- a/test-crates/fluke-curl-tests/tests/integration_test.rs
+++ b/test-crates/fluke-curl-tests/tests/integration_test.rs
@@ -1,6 +1,5 @@
 #![allow(incomplete_features)]
 #![feature(type_alias_impl_trait)]
-#![feature(async_fn_in_trait)]
 
 mod helpers;
 
diff --git a/test-crates/fluke-curl-tests/tests/proxy.rs b/test-crates/fluke-curl-tests/tests/proxy.rs
index 86f4eec9..0ddaf715 100644
--- a/test-crates/fluke-curl-tests/tests/proxy.rs
+++ b/test-crates/fluke-curl-tests/tests/proxy.rs
@@ -1,7 +1,4 @@
-#![allow(incomplete_features)]
-#![allow(unused_attributes)]
 #![feature(type_alias_impl_trait)]
-#![feature(async_fn_in_trait)]
 
 use fluke::{
     buffet::RollMut,
diff --git a/test-crates/fluke-h2spec/src/main.rs b/test-crates/fluke-h2spec/src/main.rs
index a363b1be..f2140615 100644
--- a/test-crates/fluke-h2spec/src/main.rs
+++ b/test-crates/fluke-h2spec/src/main.rs
@@ -1,5 +1,3 @@
-#![allow(incomplete_features)]
-#![feature(async_fn_in_trait)]
 
 use std::{collections::VecDeque, path::PathBuf};
 
diff --git a/test-crates/fluke-tls-sample/src/main.rs b/test-crates/fluke-tls-sample/src/main.rs
index 43a551c2..c8a68806 100644
--- a/test-crates/fluke-tls-sample/src/main.rs
+++ b/test-crates/fluke-tls-sample/src/main.rs
@@ -1,6 +1,3 @@
-#![allow(incomplete_features)]
-#![feature(async_fn_in_trait)]
-
 #[cfg(target_os = "linux")]
 mod linux;
 #[cfg(target_os = "linux")]
diff --git a/test-crates/hyper-testbed/src/main.rs b/test-crates/hyper-testbed/src/main.rs
index 57c77395..74110adf 100644
--- a/test-crates/hyper-testbed/src/main.rs
+++ b/test-crates/hyper-testbed/src/main.rs
@@ -1,4 +1,3 @@
-// #![feature(type_alias_impl_trait)]
 #![feature(impl_trait_in_assoc_type)]
 
 use std::convert::Infallible;