diff --git a/Cargo.lock b/Cargo.lock index 9af19404f07fb..256abef69561c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5227,9 +5227,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", diff --git a/Cargo.toml b/Cargo.toml index 9999274ad5801..c6e60ba1e5a5e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -184,7 +184,7 @@ proc-macro2 = "1.0.79" qstring = "0.7.2" quote = "1.0.23" rand = "0.8.5" -regex = "1.7.0" +regex = "1.10.6" rstest = "0.16.0" rustc-hash = "1.1.0" semver = "1.0.16" diff --git a/crates/next-core/src/next_config.rs b/crates/next-core/src/next_config.rs index d1b0cdfce0d6a..25cdafafff9c1 100644 --- a/crates/next-core/src/next_config.rs +++ b/crates/next-core/src/next_config.rs @@ -28,29 +28,12 @@ use crate::{ next_import_map::mdx_import_source_file, next_shared::transforms::ModularizeImportPackageConfig, }; -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -struct NextConfigAndCustomRoutesRaw { - config: NextConfig, - custom_routes: CustomRoutesRaw, -} - #[turbo_tasks::value] struct NextConfigAndCustomRoutes { config: Vc, custom_routes: Vc, } -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -struct CustomRoutesRaw { - rewrites: Rewrites, - - // unsupported - headers: Vec
, - redirects: Vec, -} - #[turbo_tasks::value] struct CustomRoutes { rewrites: Vc, diff --git a/rust-toolchain.toml b/rust-toolchain.toml index ec33a6d0a9122..59acab293f25d 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2024-05-31" +channel = "nightly-2024-08-01" components = ["rustfmt", "clippy"] profile = "minimal" diff --git a/turbopack/crates/turbo-static/src/call_resolver.rs b/turbopack/crates/turbo-static/src/call_resolver.rs index aec97607a9438..aecd8d60bfc34 100644 --- a/turbopack/crates/turbo-static/src/call_resolver.rs +++ b/turbopack/crates/turbo-static/src/call_resolver.rs @@ -41,9 +41,8 @@ impl<'a> CallResolver<'a> { bincode::deserialize_from::<_, HashMap>>( reader, ) - .map_err(|e| { + .inspect_err(|_| { tracing::warn!("failed to load existing cache, restarting"); - e }) .ok() }) diff --git a/turbopack/crates/turbo-tasks-fs/src/lib.rs b/turbopack/crates/turbo-tasks-fs/src/lib.rs index 5b84cca255cde..98cac319c4023 100644 --- a/turbopack/crates/turbo-tasks-fs/src/lib.rs +++ b/turbopack/crates/turbo-tasks-fs/src/lib.rs @@ -5,7 +5,6 @@ #![feature(io_error_more)] #![feature(round_char_boundary)] #![feature(arbitrary_self_types)] -#![feature(lint_reasons)] #![allow(clippy::mutable_key_type)] pub mod attach; diff --git a/turbopack/crates/turbo-tasks-memory/src/aggregation/increase.rs b/turbopack/crates/turbo-tasks-memory/src/aggregation/increase.rs index 37ad79d2f45a2..6fb42eeeb0731 100644 --- a/turbopack/crates/turbo-tasks-memory/src/aggregation/increase.rs +++ b/turbopack/crates/turbo-tasks-memory/src/aggregation/increase.rs @@ -331,6 +331,7 @@ pub fn increase_aggregation_number_internal( prepared.apply(ctx, balance_queue); } +#[allow(dead_code)] /// A prepared `increase_aggregation_number` operation. pub struct PreparedIncreaseAggregationNumber( PreparedInternalIncreaseAggregationNumber, diff --git a/turbopack/crates/turbo-tasks-memory/src/lib.rs b/turbopack/crates/turbo-tasks-memory/src/lib.rs index b699dbaa71a70..cb1f43b7fbdee 100644 --- a/turbopack/crates/turbo-tasks-memory/src/lib.rs +++ b/turbopack/crates/turbo-tasks-memory/src/lib.rs @@ -1,7 +1,6 @@ #![feature(hash_extract_if)] #![feature(option_get_or_insert_default)] #![feature(type_alias_impl_trait)] -#![feature(lint_reasons)] #![feature(box_patterns)] #![feature(int_roundings)] #![feature(impl_trait_in_assoc_type)] diff --git a/turbopack/crates/turbo-tasks-memory/src/memory_backend.rs b/turbopack/crates/turbo-tasks-memory/src/memory_backend.rs index 6992f861044ea..40b6dbbe6c21d 100644 --- a/turbopack/crates/turbo-tasks-memory/src/memory_backend.rs +++ b/turbopack/crates/turbo-tasks-memory/src/memory_backend.rs @@ -270,10 +270,8 @@ impl MemoryBackend { .get(key) // Avoid holding the lock for too long .map(|task_ref| *task_ref) - .map(|task_id| { + .inspect(|&task_id| { self.connect_task_child(parent_task, task_id, turbo_tasks); - - task_id }) } diff --git a/turbopack/crates/turbo-tasks-memory/tests/debug.rs b/turbopack/crates/turbo-tasks-memory/tests/debug.rs index 579b84025d1a8..42b5366ddd8a4 100644 --- a/turbopack/crates/turbo-tasks-memory/tests/debug.rs +++ b/turbopack/crates/turbo-tasks-memory/tests/debug.rs @@ -29,7 +29,7 @@ async fn transparent_debug() { async fn enum_none_debug() { run(®ISTRATION, async { let a: Vc = Enum::None.cell(); - assert_eq!(format!("{:?}", a.dbg().await.unwrap()), "Enum::None"); + assert_eq!(format!("{:?}", a.dbg().await.unwrap()), "Enum :: None"); }) .await } @@ -40,7 +40,7 @@ async fn enum_transparent_debug() { let a: Vc = Enum::Transparent(Transparent(42).cell()).cell(); assert_eq!( format!("{:?}", a.dbg().await.unwrap()), - r#"Enum::Transparent( + r#"Enum :: Transparent( 42, )"# ); @@ -54,8 +54,8 @@ async fn enum_inner_vc_debug() { let a: Vc = Enum::Enum(Enum::None.cell()).cell(); assert_eq!( format!("{:?}", a.dbg().await.unwrap()), - r#"Enum::Enum( - Enum::None, + r#"Enum :: Enum( + Enum :: None, )"# ); }) diff --git a/turbopack/crates/turbo-tasks-signposter/src/log.rs b/turbopack/crates/turbo-tasks-signposter/src/log.rs index b9138b3ad3327..d2e6aaf689e9d 100644 --- a/turbopack/crates/turbo-tasks-signposter/src/log.rs +++ b/turbopack/crates/turbo-tasks-signposter/src/log.rs @@ -49,6 +49,7 @@ unsafe impl Send for Log {} impl Default for Log { fn default() -> Self { Log { + #[allow(unused_unsafe)] // This is a false positive lint. os_log: unsafe { addr_of!(_os_log_default) as *const _ as *mut _ }, } } diff --git a/turbopack/crates/turbo-tasks/src/backend.rs b/turbopack/crates/turbo-tasks/src/backend.rs index bb1572bc3a1de..52d83405ff185 100644 --- a/turbopack/crates/turbo-tasks/src/backend.rs +++ b/turbopack/crates/turbo-tasks/src/backend.rs @@ -219,12 +219,6 @@ mod ser { impl<'de> Deserialize<'de> for PersistentTaskType { fn deserialize>(deserializer: D) -> Result { - #[derive(Deserialize)] - enum VariantKind { - Native, - ResolveNative, - ResolveTrait, - } struct Visitor; impl<'de> serde::de::Visitor<'de> for Visitor { type Value = PersistentTaskType; diff --git a/turbopack/crates/turbopack-browser/src/lib.rs b/turbopack/crates/turbopack-browser/src/lib.rs index 7dead634c88bd..921f738aabb6a 100644 --- a/turbopack/crates/turbopack-browser/src/lib.rs +++ b/turbopack/crates/turbopack-browser/src/lib.rs @@ -1,4 +1,3 @@ -#![feature(lint_reasons)] #![feature(iter_intersperse)] #![feature(int_roundings)] #![feature(arbitrary_self_types)] diff --git a/turbopack/crates/turbopack-core/src/lib.rs b/turbopack/crates/turbopack-core/src/lib.rs index bf26add21ce58..3a25df4a5f4d7 100644 --- a/turbopack/crates/turbopack-core/src/lib.rs +++ b/turbopack/crates/turbopack-core/src/lib.rs @@ -3,7 +3,6 @@ #![feature(option_get_or_insert_default)] #![feature(type_alias_impl_trait)] #![feature(assert_matches)] -#![feature(lint_reasons)] #![feature(arbitrary_self_types)] #![feature(iter_intersperse)] diff --git a/turbopack/crates/turbopack-core/src/utils.rs b/turbopack/crates/turbopack-core/src/utils.rs index af32adfb7bc9d..6f3e5060cb801 100644 --- a/turbopack/crates/turbopack-core/src/utils.rs +++ b/turbopack/crates/turbopack-core/src/utils.rs @@ -3,14 +3,14 @@ use std::{collections::HashSet, future::Future, hash::Hash, pin::Pin, task::Poll pub fn _race_pop<'a, T: 'a, F: Future + Unpin>( futures: &'a mut Vec, ) -> impl Future> + 'a { - FutureRacePop { futures } + _FutureRacePop { futures } } -struct FutureRacePop<'a, T, F: Future + Unpin> { +struct _FutureRacePop<'a, T, F: Future + Unpin> { futures: &'a mut Vec, } -impl<'a, T, F: Future + Unpin> Future for FutureRacePop<'a, T, F> { +impl<'a, T, F: Future + Unpin> Future for _FutureRacePop<'a, T, F> { type Output = Option; fn poll(mut self: Pin<&mut Self>, cx: &mut std::task::Context<'_>) -> Poll { diff --git a/turbopack/crates/turbopack-node/src/lib.rs b/turbopack/crates/turbopack-node/src/lib.rs index 73c39aff9c819..278f404fa1f29 100644 --- a/turbopack/crates/turbopack-node/src/lib.rs +++ b/turbopack/crates/turbopack-node/src/lib.rs @@ -1,6 +1,5 @@ #![feature(async_closure)] #![feature(min_specialization)] -#![feature(lint_reasons)] #![feature(arbitrary_self_types)] #![feature(extract_if)] diff --git a/turbopack/crates/turbopack-nodejs/src/lib.rs b/turbopack/crates/turbopack-nodejs/src/lib.rs index 42137e07b226e..05fdf1b4ff2c0 100644 --- a/turbopack/crates/turbopack-nodejs/src/lib.rs +++ b/turbopack/crates/turbopack-nodejs/src/lib.rs @@ -1,4 +1,3 @@ -#![feature(lint_reasons)] #![feature(iter_intersperse)] #![feature(arbitrary_self_types)]