diff --git a/Cargo.toml b/Cargo.toml index 28dda7a33d..b8fb95fb2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,6 +41,7 @@ type_complexity = "allow" undocumented_unsafe_blocks = "warn" unwrap_or_default = "warn" needless_lifetimes = "allow" +too_many_arguments = "allow" ptr_as_ptr = "warn" ptr_cast_constness = "warn" @@ -82,6 +83,7 @@ type_complexity = "allow" undocumented_unsafe_blocks = "warn" unwrap_or_default = "warn" needless_lifetimes = "allow" +too_many_arguments = "allow" ptr_as_ptr = "warn" ptr_cast_constness = "warn" diff --git a/benches/Cargo.toml b/benches/Cargo.toml index ea1992f648..28fc57e0fe 100644 --- a/benches/Cargo.toml +++ b/benches/Cargo.toml @@ -47,6 +47,7 @@ type_complexity = "allow" undocumented_unsafe_blocks = "warn" unwrap_or_default = "warn" needless_lifetimes = "allow" +too_many_arguments = "allow" ptr_as_ptr = "warn" ptr_cast_constness = "warn" diff --git a/benches/benches/bevy_reflect/function.rs b/benches/benches/bevy_reflect/function.rs index 77dee4f118..0ee1126b8e 100644 --- a/benches/benches/bevy_reflect/function.rs +++ b/benches/benches/bevy_reflect/function.rs @@ -102,7 +102,6 @@ fn simple>(a: T, b: T) -> T { a + b } -#[expect(clippy::too_many_arguments)] fn complex( _: T0, _: T1, diff --git a/crates/bevy_asset/src/server/info.rs b/crates/bevy_asset/src/server/info.rs index 9e167ef354..33645d8b1e 100644 --- a/crates/bevy_asset/src/server/info.rs +++ b/crates/bevy_asset/src/server/info.rs @@ -113,10 +113,6 @@ impl AssetInfos { .unwrap() } - #[expect( - clippy::too_many_arguments, - reason = "Arguments needed so that both `create_loading_handle_untyped()` and `get_or_create_path_handle_internal()` may share code." - )] fn create_handle_internal( infos: &mut HashMap, handle_providers: &TypeIdMap, diff --git a/crates/bevy_core_pipeline/src/core_3d/mod.rs b/crates/bevy_core_pipeline/src/core_3d/mod.rs index 77fdabcab8..4bd42104cb 100644 --- a/crates/bevy_core_pipeline/src/core_3d/mod.rs +++ b/crates/bevy_core_pipeline/src/core_3d/mod.rs @@ -609,7 +609,6 @@ pub fn extract_core_3d_camera_phases( // Extract the render phases for the prepass -#[allow(clippy::too_many_arguments)] pub fn extract_camera_prepass_phase( mut commands: Commands, mut opaque_3d_prepass_phases: ResMut>, @@ -689,7 +688,6 @@ pub fn extract_camera_prepass_phase( alpha_mask_3d_deferred_phases.retain(|entity, _| live_entities.contains(entity)); } -#[allow(clippy::too_many_arguments)] pub fn prepare_core_3d_depth_textures( mut commands: Commands, mut texture_cache: ResMut, @@ -780,7 +778,6 @@ pub struct ViewTransmissionTexture { pub sampler: Sampler, } -#[allow(clippy::too_many_arguments)] pub fn prepare_core_3d_transmission_textures( mut commands: Commands, mut texture_cache: ResMut, @@ -880,7 +877,6 @@ pub fn check_msaa(mut deferred_views: Query<&mut Msaa, (With, With, diff --git a/crates/bevy_core_pipeline/src/oit/resolve/mod.rs b/crates/bevy_core_pipeline/src/oit/resolve/mod.rs index ef8f87e1c8..a0e97e0770 100644 --- a/crates/bevy_core_pipeline/src/oit/resolve/mod.rs +++ b/crates/bevy_core_pipeline/src/oit/resolve/mod.rs @@ -124,7 +124,6 @@ pub struct OitResolvePipelineKey { layer_count: i32, } -#[allow(clippy::too_many_arguments)] pub fn queue_oit_resolve_pipeline( mut commands: Commands, pipeline_cache: Res, diff --git a/crates/bevy_core_pipeline/src/smaa/mod.rs b/crates/bevy_core_pipeline/src/smaa/mod.rs index d8eb1c90e7..12fc473061 100644 --- a/crates/bevy_core_pipeline/src/smaa/mod.rs +++ b/crates/bevy_core_pipeline/src/smaa/mod.rs @@ -911,7 +911,6 @@ impl ViewNode for SmaaNode { /// writes to the two-channel RG edges texture. Additionally, it ensures that /// all pixels it didn't touch are stenciled out so that phase 2 won't have to /// examine them. -#[allow(clippy::too_many_arguments)] fn perform_edge_detection( render_context: &mut RenderContext, smaa_pipelines: &SmaaPipelines, @@ -965,7 +964,6 @@ fn perform_edge_detection( /// This runs as part of the [`SmaaNode`]. It reads the edges texture and writes /// to the blend weight texture, using the stencil buffer to avoid processing /// pixels it doesn't need to examine. -#[allow(clippy::too_many_arguments)] fn perform_blending_weight_calculation( render_context: &mut RenderContext, smaa_pipelines: &SmaaPipelines, @@ -1024,7 +1022,6 @@ fn perform_blending_weight_calculation( /// /// This runs as part of the [`SmaaNode`]. It reads from the blend weight /// texture. It's the only phase that writes to the postprocessing destination. -#[allow(clippy::too_many_arguments)] fn perform_neighborhood_blending( render_context: &mut RenderContext, smaa_pipelines: &SmaaPipelines, diff --git a/crates/bevy_ecs/macros/src/world_query.rs b/crates/bevy_ecs/macros/src/world_query.rs index 9d97f185de..f008247657 100644 --- a/crates/bevy_ecs/macros/src/world_query.rs +++ b/crates/bevy_ecs/macros/src/world_query.rs @@ -2,10 +2,6 @@ use proc_macro2::Ident; use quote::quote; use syn::{Attribute, Fields, ImplGenerics, TypeGenerics, Visibility, WhereClause}; -#[expect( - clippy::too_many_arguments, - reason = "Required to generate the entire item structure." -)] pub(crate) fn item_struct( path: &syn::Path, fields: &Fields, @@ -55,10 +51,6 @@ pub(crate) fn item_struct( } } -#[expect( - clippy::too_many_arguments, - reason = "Required to generate the entire world query implementation." -)] pub(crate) fn world_query_impl( path: &syn::Path, struct_name: &Ident, diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs index aff7c1509e..4dc96311bb 100644 --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -504,7 +504,6 @@ impl BundleInfo { /// `table` must be the "new" table for `entity`. `table_row` must have space allocated for the /// `entity`, `bundle` must match this [`BundleInfo`]'s type #[inline] - #[allow(clippy::too_many_arguments)] unsafe fn write_components<'a, T: DynamicBundle, S: BundleComponentStatus>( &self, table: &mut Table, @@ -594,7 +593,6 @@ impl BundleInfo { /// This method _should not_ be called outside of [`BundleInfo::write_components`]. /// For more information, read the [`BundleInfo::write_components`] safety docs. /// This function inherits the safety requirements defined there. - #[allow(clippy::too_many_arguments)] pub(crate) unsafe fn initialize_required_component( table: &mut Table, sparse_sets: &mut SparseSets, diff --git a/crates/bevy_ecs/src/system/exclusive_function_system.rs b/crates/bevy_ecs/src/system/exclusive_function_system.rs index 99f3d1d029..81ac03bfb8 100644 --- a/crates/bevy_ecs/src/system/exclusive_function_system.rs +++ b/crates/bevy_ecs/src/system/exclusive_function_system.rs @@ -236,7 +236,6 @@ macro_rules! impl_exclusive_system_function { // Yes, this is strange, but `rustc` fails to compile this impl // without using this function. It fails to recognize that `func` // is a function, potentially because of the multiple impls of `FnMut` - #[allow(clippy::too_many_arguments)] fn call_inner( mut f: impl FnMut(&mut World, $($param,)*) -> Out, world: &mut World, @@ -267,7 +266,6 @@ macro_rules! impl_exclusive_system_function { // Yes, this is strange, but `rustc` fails to compile this impl // without using this function. It fails to recognize that `func` // is a function, potentially because of the multiple impls of `FnMut` - #[allow(clippy::too_many_arguments)] fn call_inner( mut f: impl FnMut(In::Param<'_>, &mut World, $($param,)*) -> Out, input: In::Inner<'_>, diff --git a/crates/bevy_ecs/src/system/function_system.rs b/crates/bevy_ecs/src/system/function_system.rs index e9db1dbea9..08c11a6422 100644 --- a/crates/bevy_ecs/src/system/function_system.rs +++ b/crates/bevy_ecs/src/system/function_system.rs @@ -1029,7 +1029,6 @@ macro_rules! impl_system_function { // Yes, this is strange, but `rustc` fails to compile this impl // without using this function. It fails to recognize that `func` // is a function, potentially because of the multiple impls of `FnMut` - #[allow(clippy::too_many_arguments)] fn call_inner( mut f: impl FnMut($($param,)*)->Out, $($param: $param,)* @@ -1056,7 +1055,6 @@ macro_rules! impl_system_function { type Param = ($($param,)*); #[inline] fn run(&mut self, input: In::Inner<'_>, param_value: SystemParamItem< ($($param,)*)>) -> Out { - #[allow(clippy::too_many_arguments)] fn call_inner( mut f: impl FnMut(In::Param<'_>, $($param,)*)->Out, input: In::Inner<'_>, diff --git a/crates/bevy_ecs/src/system/mod.rs b/crates/bevy_ecs/src/system/mod.rs index 03b3d53238..75952e0422 100644 --- a/crates/bevy_ecs/src/system/mod.rs +++ b/crates/bevy_ecs/src/system/mod.rs @@ -1111,7 +1111,6 @@ mod tests { } #[test] - #[allow(clippy::too_many_arguments)] fn can_have_16_parameters() { fn sys_x( _: Res, diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs index abcabc3891..bd939d0043 100644 --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -1746,7 +1746,6 @@ impl<'w> EntityWorldMut<'w> { /// when DROP is true removed components will be dropped otherwise they will be forgotten // We use a const generic here so that we are less reliant on // inlining for rustc to optimize out the `match DROP` - #[allow(clippy::too_many_arguments)] unsafe fn move_entity_from_remove( entity: Entity, self_location: &mut EntityLocation, @@ -1826,7 +1825,6 @@ impl<'w> EntityWorldMut<'w> { /// /// # Safety /// - A `BundleInfo` with the corresponding `BundleId` must have been initialized. - #[allow(clippy::too_many_arguments)] unsafe fn remove_bundle(&mut self, bundle: BundleId) -> EntityLocation { let entity = self.entity; let world = &mut self.world; diff --git a/crates/bevy_gizmos/src/grid.rs b/crates/bevy_gizmos/src/grid.rs index 03ee5c6654..42742e196c 100644 --- a/crates/bevy_gizmos/src/grid.rs +++ b/crates/bevy_gizmos/src/grid.rs @@ -347,7 +347,6 @@ where } } -#[allow(clippy::too_many_arguments)] fn draw_grid( gizmos: &mut GizmoBuffer, isometry: Isometry3d, diff --git a/crates/bevy_gizmos/src/pipeline_2d.rs b/crates/bevy_gizmos/src/pipeline_2d.rs index 1e85602d62..55ce5322ff 100644 --- a/crates/bevy_gizmos/src/pipeline_2d.rs +++ b/crates/bevy_gizmos/src/pipeline_2d.rs @@ -288,7 +288,6 @@ type DrawLineJointGizmo2d = ( DrawLineJointGizmo, ); -#[allow(clippy::too_many_arguments)] fn queue_line_gizmos_2d( draw_functions: Res>, pipeline: Res, @@ -365,8 +364,6 @@ fn queue_line_gizmos_2d( } } } - -#[allow(clippy::too_many_arguments)] fn queue_line_joint_gizmos_2d( draw_functions: Res>, pipeline: Res, diff --git a/crates/bevy_gizmos/src/pipeline_3d.rs b/crates/bevy_gizmos/src/pipeline_3d.rs index a36e5c55a3..89814bcbff 100644 --- a/crates/bevy_gizmos/src/pipeline_3d.rs +++ b/crates/bevy_gizmos/src/pipeline_3d.rs @@ -283,7 +283,6 @@ type DrawLineJointGizmo3d = ( DrawLineJointGizmo, ); -#[allow(clippy::too_many_arguments)] fn queue_line_gizmos_3d( draw_functions: Res>, pipeline: Res, @@ -398,7 +397,6 @@ fn queue_line_gizmos_3d( } } -#[allow(clippy::too_many_arguments)] fn queue_line_joint_gizmos_3d( draw_functions: Res>, pipeline: Res, diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs index 6eb3198c29..4edf2552e9 100644 --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -1368,7 +1368,7 @@ fn warn_on_differing_texture_transforms( } /// Loads a glTF node. -#[allow(clippy::too_many_arguments, clippy::result_large_err)] +#[allow(clippy::result_large_err)] fn load_node( gltf_node: &Node, world_builder: &mut WorldChildBuilder, diff --git a/crates/bevy_pbr/src/cluster/assign.rs b/crates/bevy_pbr/src/cluster/assign.rs index 19d8fdb059..297672a78f 100644 --- a/crates/bevy_pbr/src/cluster/assign.rs +++ b/crates/bevy_pbr/src/cluster/assign.rs @@ -135,7 +135,6 @@ impl ClusterableObjectType { } // NOTE: Run this before update_point_light_frusta! -#[allow(clippy::too_many_arguments)] pub(crate) fn assign_objects_to_clusters( mut commands: Commands, mut global_clusterable_objects: ResMut, @@ -842,7 +841,6 @@ pub(crate) fn assign_objects_to_clusters( } } -#[allow(clippy::too_many_arguments)] fn compute_aabb_for_cluster( z_near: f32, z_far: f32, diff --git a/crates/bevy_pbr/src/light/mod.rs b/crates/bevy_pbr/src/light/mod.rs index f88512a19c..fe99f1bbdc 100644 --- a/crates/bevy_pbr/src/light/mod.rs +++ b/crates/bevy_pbr/src/light/mod.rs @@ -824,7 +824,6 @@ pub fn check_dir_light_mesh_visibility( }); } -#[allow(clippy::too_many_arguments)] pub fn check_point_light_mesh_visibility( visible_point_lights: Query<&VisibleClusterableObjects>, mut point_lights: Query<( diff --git a/crates/bevy_pbr/src/material.rs b/crates/bevy_pbr/src/material.rs index 521ca52953..362b4b6d31 100644 --- a/crates/bevy_pbr/src/material.rs +++ b/crates/bevy_pbr/src/material.rs @@ -610,7 +610,6 @@ pub fn extract_mesh_materials( /// For each view, iterates over all the meshes visible from that view and adds /// them to [`BinnedRenderPhase`]s or [`SortedRenderPhase`]s as appropriate. -#[allow(clippy::too_many_arguments)] pub fn queue_material_meshes( ( opaque_draw_functions, diff --git a/crates/bevy_pbr/src/meshlet/from_mesh.rs b/crates/bevy_pbr/src/meshlet/from_mesh.rs index 6cd868e49d..8d4f1c7533 100644 --- a/crates/bevy_pbr/src/meshlet/from_mesh.rs +++ b/crates/bevy_pbr/src/meshlet/from_mesh.rs @@ -601,7 +601,6 @@ fn split_simplified_group_into_new_meshlets( new_meshlets_count } -#[allow(clippy::too_many_arguments)] fn build_and_compress_per_meshlet_vertex_data( meshlet: &meshopt_Meshlet, meshlet_vertex_ids: &[u32], diff --git a/crates/bevy_pbr/src/meshlet/instance_manager.rs b/crates/bevy_pbr/src/meshlet/instance_manager.rs index c190d7ea36..7a78abe482 100644 --- a/crates/bevy_pbr/src/meshlet/instance_manager.rs +++ b/crates/bevy_pbr/src/meshlet/instance_manager.rs @@ -81,7 +81,6 @@ impl InstanceManager { } } - #[allow(clippy::too_many_arguments)] pub fn add_instance( &mut self, instance: MainEntity, diff --git a/crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs b/crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs index a6053b412c..2a44e5934c 100644 --- a/crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs +++ b/crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs @@ -29,7 +29,6 @@ pub struct MeshletViewMaterialsMainOpaquePass(pub Vec<(u32, CachedRenderPipeline /// Prepare [`Material`] pipelines for [`super::MeshletMesh`] entities for use in [`super::MeshletMainOpaquePass3dNode`], /// and register the material with [`InstanceManager`]. -#[allow(clippy::too_many_arguments)] pub fn prepare_material_meshlet_meshes_main_opaque_pass( resource_manager: ResMut, mut instance_manager: ResMut, @@ -247,7 +246,6 @@ pub struct MeshletViewMaterialsDeferredGBufferPrepass( /// Prepare [`Material`] pipelines for [`super::MeshletMesh`] entities for use in [`super::MeshletPrepassNode`], /// and [`super::MeshletDeferredGBufferPrepassNode`] and register the material with [`InstanceManager`]. -#[allow(clippy::too_many_arguments)] pub fn prepare_material_meshlet_meshes_prepass( resource_manager: ResMut, mut instance_manager: ResMut, diff --git a/crates/bevy_pbr/src/meshlet/resource_manager.rs b/crates/bevy_pbr/src/meshlet/resource_manager.rs index 79473b2c36..c918990869 100644 --- a/crates/bevy_pbr/src/meshlet/resource_manager.rs +++ b/crates/bevy_pbr/src/meshlet/resource_manager.rs @@ -574,7 +574,6 @@ pub fn prepare_meshlet_per_frame_resources( } } -#[allow(clippy::too_many_arguments)] pub fn prepare_meshlet_view_bind_groups( meshlet_mesh_manager: Res, resource_manager: Res, diff --git a/crates/bevy_pbr/src/meshlet/visibility_buffer_raster_node.rs b/crates/bevy_pbr/src/meshlet/visibility_buffer_raster_node.rs index aa549ae679..9890deb4db 100644 --- a/crates/bevy_pbr/src/meshlet/visibility_buffer_raster_node.rs +++ b/crates/bevy_pbr/src/meshlet/visibility_buffer_raster_node.rs @@ -358,7 +358,6 @@ fn fill_cluster_buffers_pass( ); } -#[allow(clippy::too_many_arguments)] fn cull_pass( label: &'static str, render_context: &mut RenderContext, @@ -405,7 +404,6 @@ fn cull_pass( } } -#[allow(clippy::too_many_arguments)] fn raster_pass( first_pass: bool, render_context: &mut RenderContext, diff --git a/crates/bevy_pbr/src/prepass/mod.rs b/crates/bevy_pbr/src/prepass/mod.rs index 2e5a082de7..ad3c366c7a 100644 --- a/crates/bevy_pbr/src/prepass/mod.rs +++ b/crates/bevy_pbr/src/prepass/mod.rs @@ -755,7 +755,6 @@ pub fn prepare_prepass_view_bind_group( } } -#[allow(clippy::too_many_arguments)] pub fn queue_prepass_material_meshes( ( opaque_draw_functions, diff --git a/crates/bevy_pbr/src/render/light.rs b/crates/bevy_pbr/src/render/light.rs index 7f7434a9f7..9ccf2b6dd4 100644 --- a/crates/bevy_pbr/src/render/light.rs +++ b/crates/bevy_pbr/src/render/light.rs @@ -206,7 +206,6 @@ impl FromWorld for ShadowSamplers { } } -#[allow(clippy::too_many_arguments)] pub fn extract_lights( mut commands: Commands, point_light_shadow_map: Extract>, @@ -684,7 +683,6 @@ pub(crate) fn spot_light_clip_from_view(angle: f32, near_z: f32) -> Mat4 { Mat4::perspective_infinite_reverse_rh(angle * 2.0, 1.0, near_z) } -#[allow(clippy::too_many_arguments)] pub fn prepare_lights( mut commands: Commands, mut texture_cache: ResMut, @@ -1532,7 +1530,6 @@ fn despawn_entities(commands: &mut Commands, entities: Vec) { /// For each shadow cascade, iterates over all the meshes "visible" from it and /// adds them to [`BinnedRenderPhase`]s or [`SortedRenderPhase`]s as /// appropriate. -#[allow(clippy::too_many_arguments)] pub fn queue_shadows( shadow_draw_functions: Res>, prepass_pipeline: Res>, diff --git a/crates/bevy_pbr/src/render/mesh.rs b/crates/bevy_pbr/src/render/mesh.rs index de29bd2127..0697630480 100644 --- a/crates/bevy_pbr/src/render/mesh.rs +++ b/crates/bevy_pbr/src/render/mesh.rs @@ -896,7 +896,6 @@ impl RenderMeshInstanceGpuQueue { impl RenderMeshInstanceGpuBuilder { /// Flushes this mesh instance to the [`RenderMeshInstanceGpu`] and /// [`MeshInputUniform`] tables, replacing the existing entry if applicable. - #[allow(clippy::too_many_arguments)] fn update( mut self, entity: MainEntity, @@ -1170,7 +1169,6 @@ pub fn extract_meshes_for_cpu_building( /// /// This is the variant of the system that runs when we're using GPU /// [`MeshUniform`] building. -#[allow(clippy::too_many_arguments)] pub fn extract_meshes_for_gpu_building( mut render_mesh_instances: ResMut, render_visibility_ranges: Res, @@ -1351,7 +1349,6 @@ fn set_mesh_motion_vector_flags( /// Creates the [`RenderMeshInstanceGpu`]s and [`MeshInputUniform`]s when GPU /// mesh uniforms are built. -#[allow(clippy::too_many_arguments)] pub fn collect_meshes_for_gpu_building( render_mesh_instances: ResMut, batched_instance_buffers: ResMut< @@ -2411,7 +2408,6 @@ impl MeshBindGroupPair { } } -#[allow(clippy::too_many_arguments)] pub fn prepare_mesh_bind_group( meshes: Res>, mut groups: ResMut, diff --git a/crates/bevy_pbr/src/render/mesh_bindings.rs b/crates/bevy_pbr/src/render/mesh_bindings.rs index e6d07cb4e2..51b28389dc 100644 --- a/crates/bevy_pbr/src/render/mesh_bindings.rs +++ b/crates/bevy_pbr/src/render/mesh_bindings.rs @@ -495,7 +495,6 @@ impl MeshLayouts { } /// Creates the bind group for meshes with skins and morph targets. - #[allow(clippy::too_many_arguments)] pub fn morphed_skinned( &self, render_device: &RenderDevice, @@ -523,7 +522,6 @@ impl MeshLayouts { /// [`MeshLayouts::morphed_motion`] above for more information about the /// `current_skin`, `prev_skin`, `current_weights`, and `prev_weights` /// buffers. - #[allow(clippy::too_many_arguments)] pub fn morphed_skinned_motion( &self, render_device: &RenderDevice, diff --git a/crates/bevy_pbr/src/render/mesh_view_bindings.rs b/crates/bevy_pbr/src/render/mesh_view_bindings.rs index 5c8823f2d3..385c942c46 100644 --- a/crates/bevy_pbr/src/render/mesh_view_bindings.rs +++ b/crates/bevy_pbr/src/render/mesh_view_bindings.rs @@ -488,7 +488,6 @@ pub struct MeshViewBindGroup { pub value: BindGroup, } -#[allow(clippy::too_many_arguments)] pub fn prepare_mesh_view_bind_groups( mut commands: Commands, render_device: Res, diff --git a/crates/bevy_pbr/src/volumetric_fog/render.rs b/crates/bevy_pbr/src/volumetric_fog/render.rs index 76039bbbe4..a9eedad1e8 100644 --- a/crates/bevy_pbr/src/volumetric_fog/render.rs +++ b/crates/bevy_pbr/src/volumetric_fog/render.rs @@ -607,7 +607,6 @@ impl SpecializedRenderPipeline for VolumetricFogPipeline { } /// Specializes volumetric fog pipelines for all views with that effect enabled. -#[allow(clippy::too_many_arguments)] pub fn prepare_volumetric_fog_pipelines( mut commands: Commands, pipeline_cache: Res, diff --git a/crates/bevy_picking/src/events.rs b/crates/bevy_picking/src/events.rs index c3d35e0bb9..ae3d879e9a 100644 --- a/crates/bevy_picking/src/events.rs +++ b/crates/bevy_picking/src/events.rs @@ -402,7 +402,6 @@ pub struct PickingEventWriters<'w> { /// determined only by the pointer's *final position*. Since the hover state /// ultimately determines which entities receive events, this may mean that an /// entity can receive events from before or after it was actually hovered. -#[allow(clippy::too_many_arguments)] pub fn pointer_events( // Input mut input_events: EventReader, diff --git a/crates/bevy_picking/src/mesh_picking/mod.rs b/crates/bevy_picking/src/mesh_picking/mod.rs index 42671beb7b..f424a87a3f 100644 --- a/crates/bevy_picking/src/mesh_picking/mod.rs +++ b/crates/bevy_picking/src/mesh_picking/mod.rs @@ -68,7 +68,6 @@ impl Plugin for MeshPickingPlugin { } /// Casts rays into the scene using [`MeshPickingSettings`] and sends [`PointerHits`] events. -#[allow(clippy::too_many_arguments)] pub fn update_hits( backend_settings: Res, ray_map: Res, diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs index d30426f449..65608d5d06 100644 --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -897,10 +897,6 @@ impl NormalizedRenderTarget { /// /// [`OrthographicProjection`]: crate::camera::OrthographicProjection /// [`PerspectiveProjection`]: crate::camera::PerspectiveProjection -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] pub fn camera_system( mut window_resized_events: EventReader, mut window_created_events: EventReader, diff --git a/crates/bevy_render/src/mesh/allocator.rs b/crates/bevy_render/src/mesh/allocator.rs index be282a2444..f1c4394424 100644 --- a/crates/bevy_render/src/mesh/allocator.rs +++ b/crates/bevy_render/src/mesh/allocator.rs @@ -526,10 +526,6 @@ impl MeshAllocator { } /// A generic function that copies either vertex or index data into a slab. - #[expect( - clippy::too_many_arguments, - reason = "Used in systems to reduce the amount of code duplication" - )] fn copy_element_data( &mut self, mesh_id: &AssetId, diff --git a/crates/bevy_render/src/view/window/screenshot.rs b/crates/bevy_render/src/view/window/screenshot.rs index 87b6858558..01460efcad 100644 --- a/crates/bevy_render/src/view/window/screenshot.rs +++ b/crates/bevy_render/src/view/window/screenshot.rs @@ -251,10 +251,6 @@ fn extract_screenshots( system_state.apply(&mut main_world); } -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] fn prepare_screenshots( targets: Res, mut prepared: ResMut, @@ -579,10 +575,6 @@ pub(crate) fn submit_screenshot_commands(world: &World, encoder: &mut CommandEnc } } -#[expect( - clippy::too_many_arguments, - reason = "Used in systems to reduce the amount of code duplication" -)] fn render_screenshot( encoder: &mut CommandEncoder, prepared: &RenderScreenshotsPrepared, diff --git a/crates/bevy_sprite/src/mesh2d/material.rs b/crates/bevy_sprite/src/mesh2d/material.rs index b350136ef0..479cdec5ec 100644 --- a/crates/bevy_sprite/src/mesh2d/material.rs +++ b/crates/bevy_sprite/src/mesh2d/material.rs @@ -467,10 +467,6 @@ pub const fn tonemapping_pipeline_key(tonemapping: Tonemapping) -> Mesh2dPipelin } } -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] pub fn queue_material2d_meshes( opaque_draw_functions: Res>, alpha_mask_draw_functions: Res>, diff --git a/crates/bevy_sprite/src/mesh2d/mesh.rs b/crates/bevy_sprite/src/mesh2d/mesh.rs index bd12a0412f..aa7e41dbcb 100644 --- a/crates/bevy_sprite/src/mesh2d/mesh.rs +++ b/crates/bevy_sprite/src/mesh2d/mesh.rs @@ -717,10 +717,6 @@ pub struct Mesh2dViewBindGroup { pub value: BindGroup, } -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] pub fn prepare_mesh2d_view_bind_groups( mut commands: Commands, render_device: Res, diff --git a/crates/bevy_sprite/src/picking_backend.rs b/crates/bevy_sprite/src/picking_backend.rs index 435137b22f..ab7fbcddef 100644 --- a/crates/bevy_sprite/src/picking_backend.rs +++ b/crates/bevy_sprite/src/picking_backend.rs @@ -54,10 +54,6 @@ impl Plugin for SpritePickingPlugin { } } -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] fn sprite_picking( pointers: Query<(&PointerId, &PointerLocation)>, cameras: Query<(Entity, &Camera, &GlobalTransform, &Projection)>, diff --git a/crates/bevy_sprite/src/render/mod.rs b/crates/bevy_sprite/src/render/mod.rs index 62a92b4896..6d697dd64a 100644 --- a/crates/bevy_sprite/src/render/mod.rs +++ b/crates/bevy_sprite/src/render/mod.rs @@ -492,10 +492,6 @@ pub struct ImageBindGroups { values: HashMap, BindGroup>, } -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] pub fn queue_sprites( mut view_entities: Local, draw_functions: Res>, @@ -583,10 +579,6 @@ pub fn queue_sprites( } } -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] pub fn prepare_sprite_view_bind_groups( mut commands: Commands, render_device: Res, @@ -620,10 +612,6 @@ pub fn prepare_sprite_view_bind_groups( } } -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] pub fn prepare_sprite_image_bind_groups( mut commands: Commands, mut previous_len: Local, diff --git a/crates/bevy_text/src/pipeline.rs b/crates/bevy_text/src/pipeline.rs index 8b2e4e3eb3..f16fbce0dc 100644 --- a/crates/bevy_text/src/pipeline.rs +++ b/crates/bevy_text/src/pipeline.rs @@ -80,7 +80,6 @@ impl TextPipeline { /// Utilizes [`cosmic_text::Buffer`] to shape and layout text /// /// Negative or 0.0 font sizes will not be laid out. - #[allow(clippy::too_many_arguments)] pub fn update_buffer<'a>( &mut self, fonts: &Assets, @@ -207,7 +206,6 @@ impl TextPipeline { /// /// Produces a [`TextLayoutInfo`], containing [`PositionedGlyph`]s /// which contain information for rendering the text. - #[allow(clippy::too_many_arguments)] pub fn queue_text<'a>( &mut self, layout_info: &mut TextLayoutInfo, @@ -341,7 +339,6 @@ impl TextPipeline { /// /// Produces a [`TextMeasureInfo`] which can be used by a layout system /// to measure the text area on demand. - #[allow(clippy::too_many_arguments)] pub fn create_text_measure<'a>( &mut self, entity: Entity, diff --git a/crates/bevy_text/src/text2d.rs b/crates/bevy_text/src/text2d.rs index 893f127b8b..547ed6bfce 100644 --- a/crates/bevy_text/src/text2d.rs +++ b/crates/bevy_text/src/text2d.rs @@ -221,7 +221,6 @@ pub fn extract_text2d_sprite( /// /// [`ResMut>`](Assets) -- This system only adds new [`Image`] assets. /// It does not modify or observe existing ones. -#[allow(clippy::too_many_arguments)] pub fn update_text2d_layout( mut last_scale_factor: Local, // Text items which should be reprocessed again, generally when the font hasn't loaded yet. diff --git a/crates/bevy_ui/src/focus.rs b/crates/bevy_ui/src/focus.rs index d53ba3d104..f85f153a40 100644 --- a/crates/bevy_ui/src/focus.rs +++ b/crates/bevy_ui/src/focus.rs @@ -147,10 +147,6 @@ pub struct NodeQuery { /// The system that sets Interaction for all UI elements based on the mouse cursor activity /// /// Entities with a hidden [`ViewVisibility`] are always treated as released. -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] pub fn ui_focus_system( mut state: Local, camera_query: Query<(Entity, &Camera)>, diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs index 4c213541c2..1397b1c755 100644 --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -96,10 +96,6 @@ struct CameraLayoutInfo { } /// Updates the UI's layout tree, computes the new layout geometry and then updates the sizes and transforms of all the UI nodes. -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] pub fn ui_layout_system( mut commands: Commands, mut buffers: Local, diff --git a/crates/bevy_ui/src/render/box_shadow.rs b/crates/bevy_ui/src/render/box_shadow.rs index 6ad450bcfb..0d0aa7c9be 100644 --- a/crates/bevy_ui/src/render/box_shadow.rs +++ b/crates/bevy_ui/src/render/box_shadow.rs @@ -380,10 +380,6 @@ pub fn queue_shadows( } } -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] pub fn prepare_shadows( mut commands: Commands, render_device: Res, diff --git a/crates/bevy_ui/src/render/mod.rs b/crates/bevy_ui/src/render/mod.rs index d8af8300a9..c087254ab8 100644 --- a/crates/bevy_ui/src/render/mod.rs +++ b/crates/bevy_ui/src/render/mod.rs @@ -835,10 +835,6 @@ pub struct ImageNodeBindGroups { pub values: HashMap, BindGroup>, } -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] pub fn prepare_uinodes( mut commands: Commands, render_device: Res, diff --git a/crates/bevy_ui/src/render/ui_material_pipeline.rs b/crates/bevy_ui/src/render/ui_material_pipeline.rs index 3176e06ed6..b8e1a7564a 100644 --- a/crates/bevy_ui/src/render/ui_material_pipeline.rs +++ b/crates/bevy_ui/src/render/ui_material_pipeline.rs @@ -424,10 +424,6 @@ pub fn extract_ui_material_nodes( } } -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] pub fn prepare_uimaterial_nodes( mut commands: Commands, render_device: Res, @@ -608,10 +604,6 @@ impl RenderAsset for PreparedUiMaterial { } } -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] pub fn queue_ui_material_nodes( extracted_uinodes: Res>, draw_functions: Res>, diff --git a/crates/bevy_ui/src/render/ui_texture_slice_pipeline.rs b/crates/bevy_ui/src/render/ui_texture_slice_pipeline.rs index aa1a51b611..f2d5eb243e 100644 --- a/crates/bevy_ui/src/render/ui_texture_slice_pipeline.rs +++ b/crates/bevy_ui/src/render/ui_texture_slice_pipeline.rs @@ -377,10 +377,6 @@ pub fn queue_ui_slices( } } -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] pub fn prepare_ui_slices( mut commands: Commands, render_device: Res, diff --git a/crates/bevy_ui/src/stack.rs b/crates/bevy_ui/src/stack.rs index 40512edf88..b8031df371 100644 --- a/crates/bevy_ui/src/stack.rs +++ b/crates/bevy_ui/src/stack.rs @@ -38,10 +38,6 @@ impl ChildBufferCache { /// Create a list of root nodes from parentless entities and entities with a `GlobalZIndex` component. /// Then build the `UiStack` from a walk of the existing layout trees starting from each root node, /// filtering branches by `Without`so that we don't revisit nodes. -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] pub fn ui_stack_system( mut cache: Local, mut root_nodes: Local>, diff --git a/crates/bevy_ui/src/widget/text.rs b/crates/bevy_ui/src/widget/text.rs index ea114f8ef2..6706e25df8 100644 --- a/crates/bevy_ui/src/widget/text.rs +++ b/crates/bevy_ui/src/widget/text.rs @@ -188,10 +188,6 @@ impl Measure for TextMeasure { } } -#[expect( - clippy::too_many_arguments, - reason = "Used in measure_text_system to make the function body easier to read" -)] #[inline] fn create_text_measure<'a>( entity: Entity, @@ -245,10 +241,6 @@ fn create_text_measure<'a>( /// is only able to detect that a `Text` component has changed and will regenerate the `Measure` on /// color changes. This can be expensive, particularly for large blocks of text, and the [`bypass_change_detection`](bevy_ecs::change_detection::DetectChangesMut::bypass_change_detection) /// method should be called when only changing the `Text`'s colors. -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] pub fn measure_text_system( mut scale_factors_buffer: Local>, mut last_scale_factors: Local>, @@ -316,10 +308,6 @@ pub fn measure_text_system( core::mem::swap(&mut *last_scale_factors, &mut *scale_factors_buffer); } -#[expect( - clippy::too_many_arguments, - reason = "Used in text_system to make the function body easier to read" -)] #[inline] fn queue_text( entity: Entity, @@ -391,10 +379,6 @@ fn queue_text( /// /// [`ResMut>`](Assets) -- This system only adds new [`Image`] assets. /// It does not modify or observe existing ones. The exception is when adding new glyphs to a [`bevy_text::FontAtlas`]. -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] pub fn text_system( mut textures: ResMut>, fonts: Res>, diff --git a/crates/bevy_winit/src/system.rs b/crates/bevy_winit/src/system.rs index 702abbf4e0..2c481f9608 100644 --- a/crates/bevy_winit/src/system.rs +++ b/crates/bevy_winit/src/system.rs @@ -202,10 +202,6 @@ pub fn create_monitors( }); } -#[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." -)] pub(crate) fn despawn_windows( closing: Query>, mut closed: RemovedComponents, diff --git a/crates/bevy_winit/src/winit_windows.rs b/crates/bevy_winit/src/winit_windows.rs index 2ae9d610b9..be4a7c21e5 100644 --- a/crates/bevy_winit/src/winit_windows.rs +++ b/crates/bevy_winit/src/winit_windows.rs @@ -43,10 +43,6 @@ pub struct WinitWindows { impl WinitWindows { /// Creates a `winit` window and associates it with our entity. - #[expect( - clippy::too_many_arguments, - reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be." - )] pub fn create_window( &mut self, event_loop: &ActiveEventLoop, diff --git a/examples/2d/mesh2d_manual.rs b/examples/2d/mesh2d_manual.rs index 9870d48e65..da35c2a53d 100644 --- a/examples/2d/mesh2d_manual.rs +++ b/examples/2d/mesh2d_manual.rs @@ -360,7 +360,6 @@ pub fn extract_colored_mesh2d( } /// Queue the 2d meshes marked with [`ColoredMesh2d`] using our custom pipeline and draw function -#[allow(clippy::too_many_arguments)] pub fn queue_colored_mesh2d( transparent_draw_functions: Res>, colored_mesh2d_pipeline: Res, diff --git a/examples/3d/blend_modes.rs b/examples/3d/blend_modes.rs index b9f4343102..830acfdb34 100644 --- a/examples/3d/blend_modes.rs +++ b/examples/3d/blend_modes.rs @@ -246,7 +246,6 @@ impl Default for ExampleState { } } -#[allow(clippy::too_many_arguments)] fn example_control_system( mut materials: ResMut>, controllable: Query<(&MeshMaterial3d, &ExampleControls)>, diff --git a/examples/3d/deferred_rendering.rs b/examples/3d/deferred_rendering.rs index 2bca5a5be7..0ac3c4db37 100644 --- a/examples/3d/deferred_rendering.rs +++ b/examples/3d/deferred_rendering.rs @@ -280,7 +280,6 @@ enum DefaultRenderMode { ForwardPrepass, } -#[allow(clippy::too_many_arguments)] fn switch_mode( mut text: Single<&mut Text>, mut commands: Commands, diff --git a/examples/3d/ssr.rs b/examples/3d/ssr.rs index 1cc3695354..9d0026fbbc 100644 --- a/examples/3d/ssr.rs +++ b/examples/3d/ssr.rs @@ -338,7 +338,6 @@ fn move_camera( } // Adjusts app settings per user input. -#[allow(clippy::too_many_arguments)] fn adjust_app_settings( mut commands: Commands, keyboard_input: Res>, diff --git a/examples/3d/transmission.rs b/examples/3d/transmission.rs index b6a6425baf..42f05ac2fa 100644 --- a/examples/3d/transmission.rs +++ b/examples/3d/transmission.rs @@ -380,7 +380,6 @@ impl Default for ExampleState { } } -#[allow(clippy::too_many_arguments)] fn example_control_system( mut commands: Commands, mut materials: ResMut>, diff --git a/examples/helpers/camera_controller.rs b/examples/helpers/camera_controller.rs index 4a3e696db1..5a862fb439 100644 --- a/examples/helpers/camera_controller.rs +++ b/examples/helpers/camera_controller.rs @@ -99,7 +99,6 @@ Freecam Controls: } } -#[allow(clippy::too_many_arguments)] fn run_camera_controller( time: Res