From 8def0c8418b8c128afa848093c374eac3b356c5e Mon Sep 17 00:00:00 2001 From: Justin Ridgewell Date: Thu, 17 Aug 2023 12:37:33 -0400 Subject: [PATCH] Update rust toolchain (#54130) The current toolchain is very buggy. Closes WEB-1400 --- .cargo/config.toml | 4 ++++ packages/next-swc/crates/next-core/src/app_source.rs | 4 ---- packages/next-swc/crates/next-dev/src/lib.rs | 1 - rust-toolchain | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 4b7106839cd3f..d4d07a75f13a3 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -32,4 +32,8 @@ rustflags = [ "-Zshare-generics=y", "-Csymbol-mangling-version=v0", "-Aclippy::too_many_arguments", + # Clippy's needless mut lint is buggy: https://github.com/rust-lang/rust-clippy/issues/11299 + "-Aclippy::needless_pass_by_ref_mut", + # Clippy's partial_eq lint is buggy: https://github.com/rust-lang/rust-clippy/issues/11178 + "-Aclippy::incorrect_partial_ord_impl_on_ord_type", ] diff --git a/packages/next-swc/crates/next-core/src/app_source.rs b/packages/next-swc/crates/next-core/src/app_source.rs index b71824e72c08d..e5af263c3d6bd 100644 --- a/packages/next-swc/crates/next-core/src/app_source.rs +++ b/packages/next-swc/crates/next-core/src/app_source.rs @@ -427,7 +427,6 @@ fn next_edge_page_transition( ) } -#[allow(clippy::too_many_arguments)] #[turbo_tasks::function] fn app_context( project_path: Vc, @@ -768,7 +767,6 @@ async fn create_global_metadata_source( Ok(Vc::upcast(CombinedContentSource { sources }.cell())) } -#[allow(clippy::too_many_arguments)] #[turbo_tasks::function] async fn create_app_page_source_for_route( pathname: String, @@ -819,7 +817,6 @@ async fn create_app_page_source_for_route( Ok(source.issue_file_path(app_dir, format!("Next.js App Page Route {pathname}"))) } -#[allow(clippy::too_many_arguments)] #[turbo_tasks::function] async fn create_app_not_found_page_source( loader_tree: Vc, @@ -865,7 +862,6 @@ async fn create_app_not_found_page_source( Ok(source.issue_file_path(app_dir, "Next.js App Page Route /404".to_string())) } -#[allow(clippy::too_many_arguments)] #[turbo_tasks::function] async fn create_app_route_source_for_route( pathname: String, diff --git a/packages/next-swc/crates/next-dev/src/lib.rs b/packages/next-swc/crates/next-dev/src/lib.rs index 3b8d75f09a5ed..902ab2c13bc90 100644 --- a/packages/next-swc/crates/next-dev/src/lib.rs +++ b/packages/next-swc/crates/next-dev/src/lib.rs @@ -294,7 +294,6 @@ async fn server_env( Ok(Vc::upcast(CustomProcessEnv::new(env, Vc::cell(map)))) } -#[allow(clippy::too_many_arguments)] #[turbo_tasks::function] async fn source( root_dir: String, diff --git a/rust-toolchain b/rust-toolchain index cf53f1cbd5227..cd9bf832ae2a4 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2023-07-03 \ No newline at end of file +nightly-2023-07-21