diff --git a/Cargo.toml b/Cargo.toml index ae4637c77c9f5..6e1bafd1ddc83 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ keywords = ["game", "engine", "gamedev", "graphics", "bevy"] license = "MIT OR Apache-2.0" readme = "README.md" repository = "https://github.com/bevyengine/bevy" -rust-version = "1.70.0" +rust-version = "1.74.0" [workspace] exclude = [ @@ -29,6 +29,12 @@ members = [ "errors", ] +[workspace.lints.clippy] +type_complexity = "allow" + +[lints] +workspace = true + [features] default = [ "animation", diff --git a/crates/bevy_a11y/Cargo.toml b/crates/bevy_a11y/Cargo.toml index f4aed85f15302..d95482ee3b8bc 100644 --- a/crates/bevy_a11y/Cargo.toml +++ b/crates/bevy_a11y/Cargo.toml @@ -15,3 +15,6 @@ bevy_derive = { path = "../bevy_derive", version = "0.12.0" } bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } accesskit = "0.12" + +[lints] +workspace = true diff --git a/crates/bevy_a11y/src/lib.rs b/crates/bevy_a11y/src/lib.rs index 576b920f4183b..4a1948c065ec7 100644 --- a/crates/bevy_a11y/src/lib.rs +++ b/crates/bevy_a11y/src/lib.rs @@ -1,7 +1,6 @@ //! Accessibility for Bevy #![warn(missing_docs)] -#![allow(clippy::type_complexity)] #![forbid(unsafe_code)] use std::sync::{ diff --git a/crates/bevy_animation/Cargo.toml b/crates/bevy_animation/Cargo.toml index 45796ffc66755..698c243f23156 100644 --- a/crates/bevy_animation/Cargo.toml +++ b/crates/bevy_animation/Cargo.toml @@ -21,3 +21,6 @@ bevy_utils = { path = "../bevy_utils", version = "0.12.0" } bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } bevy_transform = { path = "../bevy_transform", version = "0.12.0" } bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0" } + +[lints] +workspace = true diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs index e7896dcaa8ee5..1e62fa7f10757 100644 --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -1,7 +1,6 @@ //! Animation for the game engine Bevy #![warn(missing_docs)] -#![allow(clippy::type_complexity)] use std::ops::Deref; use std::time::Duration; diff --git a/crates/bevy_app/Cargo.toml b/crates/bevy_app/Cargo.toml index 65e920fbbd4ed..db5ed32e74014 100644 --- a/crates/bevy_app/Cargo.toml +++ b/crates/bevy_app/Cargo.toml @@ -32,3 +32,5 @@ downcast-rs = "1.2.0" wasm-bindgen = { version = "0.2" } web-sys = { version = "0.3", features = [ "Window" ] } +[lints] +workspace = true diff --git a/crates/bevy_app/src/lib.rs b/crates/bevy_app/src/lib.rs index 3439620a46633..9aaabc25ee696 100644 --- a/crates/bevy_app/src/lib.rs +++ b/crates/bevy_app/src/lib.rs @@ -1,7 +1,6 @@ //! This crate is about everything concerning the highest-level, application layer of a Bevy app. #![warn(missing_docs)] -#![allow(clippy::type_complexity)] mod app; mod main_schedule; diff --git a/crates/bevy_asset/Cargo.toml b/crates/bevy_asset/Cargo.toml index eb5e2ce6a298a..c088c61ac4d81 100644 --- a/crates/bevy_asset/Cargo.toml +++ b/crates/bevy_asset/Cargo.toml @@ -53,3 +53,6 @@ notify-debouncer-full = { version = "0.3.1", optional = true } [dev-dependencies] bevy_core = { path = "../bevy_core", version = "0.12.0" } + +[lints] +workspace = true diff --git a/crates/bevy_asset/macros/Cargo.toml b/crates/bevy_asset/macros/Cargo.toml index d1ccd85035277..bf0d46725c39a 100644 --- a/crates/bevy_asset/macros/Cargo.toml +++ b/crates/bevy_asset/macros/Cargo.toml @@ -17,3 +17,6 @@ bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.12.0" } syn = "2.0" proc-macro2 = "1.0" quote = "1.0" + +[lints] +workspace = true diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs index 004f87a857fff..a783d20847841 100644 --- a/crates/bevy_asset/src/lib.rs +++ b/crates/bevy_asset/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - pub mod io; pub mod meta; pub mod processor; diff --git a/crates/bevy_audio/Cargo.toml b/crates/bevy_audio/Cargo.toml index 652defe88d17d..60de4c82af4ad 100644 --- a/crates/bevy_audio/Cargo.toml +++ b/crates/bevy_audio/Cargo.toml @@ -28,7 +28,6 @@ oboe = { version = "0.5", optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] rodio = { version = "0.17", default-features = false, features = ["wasm-bindgen"] } - [features] mp3 = ["rodio/mp3"] flac = ["rodio/flac"] @@ -43,3 +42,6 @@ symphonia-vorbis = ["rodio/symphonia-vorbis"] symphonia-wav = ["rodio/symphonia-wav"] # Enable using a shared stdlib for cxx on Android. android_shared_stdcxx = ["oboe/shared-stdcxx"] + +[lints] +workspace = true diff --git a/crates/bevy_audio/src/lib.rs b/crates/bevy_audio/src/lib.rs index 1a595ad1c7dd8..5c08a079ce437 100644 --- a/crates/bevy_audio/src/lib.rs +++ b/crates/bevy_audio/src/lib.rs @@ -21,7 +21,6 @@ //! ``` #![forbid(unsafe_code)] -#![allow(clippy::type_complexity)] #![warn(missing_docs)] mod audio; diff --git a/crates/bevy_core/Cargo.toml b/crates/bevy_core/Cargo.toml index 231b9bdcf5f7c..3ca9f6b46c769 100644 --- a/crates/bevy_core/Cargo.toml +++ b/crates/bevy_core/Cargo.toml @@ -27,3 +27,6 @@ serialize = ["dep:serde"] [dev-dependencies] crossbeam-channel = "0.5.0" + +[lints] +workspace = true diff --git a/crates/bevy_core/src/lib.rs b/crates/bevy_core/src/lib.rs index c222af6a9d9fe..c925bc99362da 100644 --- a/crates/bevy_core/src/lib.rs +++ b/crates/bevy_core/src/lib.rs @@ -1,5 +1,5 @@ #![warn(missing_docs)] -#![allow(clippy::type_complexity)] + //! This crate provides core functionality for Bevy Engine. mod name; diff --git a/crates/bevy_core_pipeline/Cargo.toml b/crates/bevy_core_pipeline/Cargo.toml index e2bdf17000e18..394ffe67f1f4a 100644 --- a/crates/bevy_core_pipeline/Cargo.toml +++ b/crates/bevy_core_pipeline/Cargo.toml @@ -34,3 +34,6 @@ bevy_utils = { path = "../bevy_utils", version = "0.12.0" } serde = { version = "1", features = ["derive"] } bitflags = "2.3" radsort = "0.1" + +[lints] +workspace = true diff --git a/crates/bevy_core_pipeline/src/lib.rs b/crates/bevy_core_pipeline/src/lib.rs index ec119ad5ae551..f710b8c704650 100644 --- a/crates/bevy_core_pipeline/src/lib.rs +++ b/crates/bevy_core_pipeline/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - pub mod blit; pub mod bloom; pub mod clear_color; diff --git a/crates/bevy_derive/Cargo.toml b/crates/bevy_derive/Cargo.toml index 9e51c0e5ca046..f8d081f029849 100644 --- a/crates/bevy_derive/Cargo.toml +++ b/crates/bevy_derive/Cargo.toml @@ -16,3 +16,6 @@ bevy_macro_utils = { path = "../bevy_macro_utils", version = "0.12.0" } quote = "1.0" syn = { version = "2.0", features = ["full"] } + +[lints] +workspace = true diff --git a/crates/bevy_derive/src/lib.rs b/crates/bevy_derive/src/lib.rs index b6766c0dc8959..18d61262ee0fd 100644 --- a/crates/bevy_derive/src/lib.rs +++ b/crates/bevy_derive/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - extern crate proc_macro; mod app_plugin; diff --git a/crates/bevy_diagnostic/Cargo.toml b/crates/bevy_diagnostic/Cargo.toml index 18e3d0e27c1cc..cfbc41b295abd 100644 --- a/crates/bevy_diagnostic/Cargo.toml +++ b/crates/bevy_diagnostic/Cargo.toml @@ -31,3 +31,6 @@ sysinfo = { version = "0.29.0", default-features = false, features = [ # Only include when not bevy_dynamic_plugin and on linux/windows/android [target.'cfg(any(target_os = "linux", target_os = "windows", target_os = "android"))'.dependencies] sysinfo = { version = "0.29.0", default-features = false } + +[lints] +workspace = true diff --git a/crates/bevy_diagnostic/src/lib.rs b/crates/bevy_diagnostic/src/lib.rs index 0422df0cb4380..aaa0ea449ab34 100644 --- a/crates/bevy_diagnostic/src/lib.rs +++ b/crates/bevy_diagnostic/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - mod diagnostic; mod entity_count_diagnostics_plugin; mod frame_time_diagnostics_plugin; diff --git a/crates/bevy_dylib/Cargo.toml b/crates/bevy_dylib/Cargo.toml index e08f5609838f0..f85950952eb11 100644 --- a/crates/bevy_dylib/Cargo.toml +++ b/crates/bevy_dylib/Cargo.toml @@ -13,3 +13,6 @@ crate-type = ["dylib"] [dependencies] bevy_internal = { path = "../bevy_internal", version = "0.12.0", default-features = false } + +[lints] +workspace = true diff --git a/crates/bevy_dylib/src/lib.rs b/crates/bevy_dylib/src/lib.rs index 2c5d6429676b5..a950f985d611a 100644 --- a/crates/bevy_dylib/src/lib.rs +++ b/crates/bevy_dylib/src/lib.rs @@ -1,5 +1,4 @@ #![warn(missing_docs)] -#![allow(clippy::type_complexity)] #![allow(clippy::single_component_path_imports)] //! Forces dynamic linking of Bevy. diff --git a/crates/bevy_dynamic_plugin/Cargo.toml b/crates/bevy_dynamic_plugin/Cargo.toml index 38164324a0e35..f21424ea47381 100644 --- a/crates/bevy_dynamic_plugin/Cargo.toml +++ b/crates/bevy_dynamic_plugin/Cargo.toml @@ -15,3 +15,6 @@ bevy_app = { path = "../bevy_app", version = "0.12.0" } # other libloading = { version = "0.8" } thiserror = "1.0" + +[lints] +workspace = true diff --git a/crates/bevy_dynamic_plugin/src/lib.rs b/crates/bevy_dynamic_plugin/src/lib.rs index ee59ff2cb135a..4ff6f92606665 100644 --- a/crates/bevy_dynamic_plugin/src/lib.rs +++ b/crates/bevy_dynamic_plugin/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - mod loader; pub use loader::*; diff --git a/crates/bevy_ecs/Cargo.toml b/crates/bevy_ecs/Cargo.toml index 82d5736118cc3..3231e7b4101ff 100644 --- a/crates/bevy_ecs/Cargo.toml +++ b/crates/bevy_ecs/Cargo.toml @@ -44,3 +44,6 @@ path = "examples/resources.rs" [[example]] name = "change_detection" path = "examples/change_detection.rs" + +[lints] +workspace = true diff --git a/crates/bevy_ecs/macros/Cargo.toml b/crates/bevy_ecs/macros/Cargo.toml index d19d740497c84..035a29ff825b4 100644 --- a/crates/bevy_ecs/macros/Cargo.toml +++ b/crates/bevy_ecs/macros/Cargo.toml @@ -14,3 +14,6 @@ bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.12.0" } syn = "2.0" quote = "1.0" proc-macro2 = "1.0" + +[lints] +workspace = true diff --git a/crates/bevy_ecs/src/lib.rs b/crates/bevy_ecs/src/lib.rs index f971697beb539..71109585f2c57 100644 --- a/crates/bevy_ecs/src/lib.rs +++ b/crates/bevy_ecs/src/lib.rs @@ -1,6 +1,5 @@ #![warn(clippy::undocumented_unsafe_blocks)] #![warn(missing_docs)] -#![allow(clippy::type_complexity)] #![doc = include_str!("../README.md")] #[cfg(target_pointer_width = "16")] diff --git a/crates/bevy_ecs_compile_fail_tests/src/lib.rs b/crates/bevy_ecs_compile_fail_tests/src/lib.rs index e12684f7648c9..d0d1683dd6b97 100644 --- a/crates/bevy_ecs_compile_fail_tests/src/lib.rs +++ b/crates/bevy_ecs_compile_fail_tests/src/lib.rs @@ -1,3 +1 @@ -#![allow(clippy::type_complexity)] - // Nothing here, check out the integration tests diff --git a/crates/bevy_encase_derive/Cargo.toml b/crates/bevy_encase_derive/Cargo.toml index 311b11c6e6536..b6c65e2d69d4c 100644 --- a/crates/bevy_encase_derive/Cargo.toml +++ b/crates/bevy_encase_derive/Cargo.toml @@ -14,3 +14,6 @@ proc-macro = true [dependencies] bevy_macro_utils = { path = "../bevy_macro_utils", version = "0.12.0" } encase_derive_impl = "0.6.1" + +[lints] +workspace = true diff --git a/crates/bevy_encase_derive/src/lib.rs b/crates/bevy_encase_derive/src/lib.rs index cc81b6edd52d0..d57be9f85c7c5 100644 --- a/crates/bevy_encase_derive/src/lib.rs +++ b/crates/bevy_encase_derive/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - use bevy_macro_utils::BevyManifest; use encase_derive_impl::{implement, syn}; diff --git a/crates/bevy_gilrs/Cargo.toml b/crates/bevy_gilrs/Cargo.toml index 250ad5fbfd13f..b6439c42e128a 100644 --- a/crates/bevy_gilrs/Cargo.toml +++ b/crates/bevy_gilrs/Cargo.toml @@ -20,3 +20,6 @@ bevy_time = { path = "../bevy_time", version = "0.12.0" } # other gilrs = "0.10.1" thiserror = "1.0" + +[lints] +workspace = true diff --git a/crates/bevy_gilrs/src/lib.rs b/crates/bevy_gilrs/src/lib.rs index 39172a4053c2b..46867b73a2f96 100644 --- a/crates/bevy_gilrs/src/lib.rs +++ b/crates/bevy_gilrs/src/lib.rs @@ -3,7 +3,6 @@ //! This crate is built on top of [GilRs](gilrs), a library //! that handles abstracting over platform-specific gamepad APIs. -#![allow(clippy::type_complexity)] #![warn(missing_docs)] mod converter; diff --git a/crates/bevy_gizmos/Cargo.toml b/crates/bevy_gizmos/Cargo.toml index 0917b71f97763..1f404d1bfc957 100644 --- a/crates/bevy_gizmos/Cargo.toml +++ b/crates/bevy_gizmos/Cargo.toml @@ -25,3 +25,6 @@ bevy_core = { path = "../bevy_core", version = "0.12.0" } bevy_reflect = { path = "../bevy_reflect", version = "0.12.0" } bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.12.0" } bevy_transform = { path = "../bevy_transform", version = "0.12.0" } + +[lints] +workspace = true diff --git a/crates/bevy_gizmos/src/lib.rs b/crates/bevy_gizmos/src/lib.rs index 5ad9d8934db06..f21f1c7424325 100644 --- a/crates/bevy_gizmos/src/lib.rs +++ b/crates/bevy_gizmos/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] //! This crate adds an immediate mode drawing api to Bevy for visual debugging. diff --git a/crates/bevy_gltf/Cargo.toml b/crates/bevy_gltf/Cargo.toml index 8aa900018bd97..a6339679fd31f 100644 --- a/crates/bevy_gltf/Cargo.toml +++ b/crates/bevy_gltf/Cargo.toml @@ -47,3 +47,6 @@ base64 = "0.13.0" percent-encoding = "2.1" serde = { version = "1.0", features = ["derive"] } serde_json = "1" + +[lints] +workspace = true diff --git a/crates/bevy_gltf/src/lib.rs b/crates/bevy_gltf/src/lib.rs index 559c8ae3c8e63..fe47fd4dfdd9f 100644 --- a/crates/bevy_gltf/src/lib.rs +++ b/crates/bevy_gltf/src/lib.rs @@ -2,7 +2,7 @@ //! for loading glTF 2.0 (a standard 3D scene definition format) files in Bevy. //! //! The [glTF 2.0 specification](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html) defines the format of the glTF files. -#![allow(clippy::type_complexity)] + #![warn(missing_docs)] #[cfg(feature = "bevy_animation")] diff --git a/crates/bevy_hierarchy/Cargo.toml b/crates/bevy_hierarchy/Cargo.toml index 20c6b86811f85..1f425a1f5b906 100644 --- a/crates/bevy_hierarchy/Cargo.toml +++ b/crates/bevy_hierarchy/Cargo.toml @@ -22,3 +22,6 @@ bevy_utils = { path = "../bevy_utils", version = "0.12.0" } # other smallvec = { version = "1.6", features = ["serde", "union", "const_generics"] } + +[lints] +workspace = true diff --git a/crates/bevy_hierarchy/src/lib.rs b/crates/bevy_hierarchy/src/lib.rs index d616e5384ae13..f156086b1a926 100644 --- a/crates/bevy_hierarchy/src/lib.rs +++ b/crates/bevy_hierarchy/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] //! `bevy_hierarchy` can be used to define hierarchies of entities. //! diff --git a/crates/bevy_input/Cargo.toml b/crates/bevy_input/Cargo.toml index 9f2ce328006fa..a744fde616ed4 100644 --- a/crates/bevy_input/Cargo.toml +++ b/crates/bevy_input/Cargo.toml @@ -28,3 +28,6 @@ thiserror = "1.0" [dev-dependencies] bevy = { path = "../../", version = "0.12.0" } + +[lints] +workspace = true diff --git a/crates/bevy_input/src/lib.rs b/crates/bevy_input/src/lib.rs index 7af8fec03add2..259b1623f153c 100644 --- a/crates/bevy_input/src/lib.rs +++ b/crates/bevy_input/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] //! Input functionality for the [Bevy game engine](https://bevyengine.org/). diff --git a/crates/bevy_internal/Cargo.toml b/crates/bevy_internal/Cargo.toml index a9c46dd06a615..525d732c8999b 100644 --- a/crates/bevy_internal/Cargo.toml +++ b/crates/bevy_internal/Cargo.toml @@ -153,3 +153,6 @@ bevy_ui = { path = "../bevy_ui", optional = true, version = "0.12.0" } bevy_winit = { path = "../bevy_winit", optional = true, version = "0.12.0" } bevy_gilrs = { path = "../bevy_gilrs", optional = true, version = "0.12.0" } bevy_gizmos = { path = "../bevy_gizmos", optional = true, version = "0.12.0", default-features = false } + +[lints] +workspace = true diff --git a/crates/bevy_internal/src/lib.rs b/crates/bevy_internal/src/lib.rs index 8e6bf57e52909..42b368375a6e1 100644 --- a/crates/bevy_internal/src/lib.rs +++ b/crates/bevy_internal/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] //! This module is separated into its own crate to enable simple dynamic linking for Bevy, and should not be used directly diff --git a/crates/bevy_log/Cargo.toml b/crates/bevy_log/Cargo.toml index 4075942ae4403..12b20caa4f707 100644 --- a/crates/bevy_log/Cargo.toml +++ b/crates/bevy_log/Cargo.toml @@ -30,3 +30,6 @@ android_log-sys = "0.3.0" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.6" tracing-wasm = "0.2.1" + +[lints] +workspace = true diff --git a/crates/bevy_log/src/lib.rs b/crates/bevy_log/src/lib.rs index a912d7d984b5c..cc8d3e7a47100 100644 --- a/crates/bevy_log/src/lib.rs +++ b/crates/bevy_log/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] //! This crate provides logging functions and configuration for [Bevy](https://bevyengine.org) //! apps, and automatically configures platform specific log handlers (i.e. WASM or Android). diff --git a/crates/bevy_macro_utils/Cargo.toml b/crates/bevy_macro_utils/Cargo.toml index b790c8c9fae8e..88082b5a1ecec 100644 --- a/crates/bevy_macro_utils/Cargo.toml +++ b/crates/bevy_macro_utils/Cargo.toml @@ -14,3 +14,6 @@ syn = "2.0" quote = "1.0" rustc-hash = "1.0" proc-macro2 = "1.0" + +[lints] +workspace = true diff --git a/crates/bevy_macro_utils/src/lib.rs b/crates/bevy_macro_utils/src/lib.rs index 2363d61cf0062..d14a2c6db7eef 100644 --- a/crates/bevy_macro_utils/src/lib.rs +++ b/crates/bevy_macro_utils/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] #![deny(unsafe_code)] //! A collection of helper types and functions for working on macros within the Bevy ecosystem. diff --git a/crates/bevy_math/Cargo.toml b/crates/bevy_math/Cargo.toml index 09daa7d938792..7ee418a42158e 100644 --- a/crates/bevy_math/Cargo.toml +++ b/crates/bevy_math/Cargo.toml @@ -20,3 +20,6 @@ mint = ["glam/mint"] glam_assert = ["glam/glam-assert"] # Enable assertions in debug builds to check the validity of parameters passed to glam debug_glam_assert = ["glam/debug-glam-assert"] + +[lints] +workspace = true diff --git a/crates/bevy_math/src/lib.rs b/crates/bevy_math/src/lib.rs index 31ff134cf39cf..4d44d095c8fed 100644 --- a/crates/bevy_math/src/lib.rs +++ b/crates/bevy_math/src/lib.rs @@ -4,7 +4,6 @@ //! matrices like [`Mat2`], [`Mat3`] and [`Mat4`] and orientation representations //! like [`Quat`]. -#![allow(clippy::type_complexity)] #![warn(missing_docs)] mod affine3; diff --git a/crates/bevy_mikktspace/Cargo.toml b/crates/bevy_mikktspace/Cargo.toml index 105e730591f97..9698b67301c5b 100644 --- a/crates/bevy_mikktspace/Cargo.toml +++ b/crates/bevy_mikktspace/Cargo.toml @@ -15,3 +15,6 @@ glam = "0.24.1" [[example]] name = "generate" + +[lints] +workspace = true diff --git a/crates/bevy_mikktspace/src/lib.rs b/crates/bevy_mikktspace/src/lib.rs index 365c2734800db..89d7b05427407 100644 --- a/crates/bevy_mikktspace/src/lib.rs +++ b/crates/bevy_mikktspace/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![allow(clippy::all)] use glam::{Vec2, Vec3}; diff --git a/crates/bevy_pbr/Cargo.toml b/crates/bevy_pbr/Cargo.toml index 14759e5b7f55d..d959af147b694 100644 --- a/crates/bevy_pbr/Cargo.toml +++ b/crates/bevy_pbr/Cargo.toml @@ -35,3 +35,6 @@ radsort = "0.1" naga_oil = "0.10" smallvec = "1.6" thread_local = "1.0" + +[lints] +workspace = true diff --git a/crates/bevy_pbr/src/lib.rs b/crates/bevy_pbr/src/lib.rs index 8e1cfdd41d34b..d50c4028888a4 100644 --- a/crates/bevy_pbr/src/lib.rs +++ b/crates/bevy_pbr/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - pub mod wireframe; mod alpha; diff --git a/crates/bevy_ptr/Cargo.toml b/crates/bevy_ptr/Cargo.toml index f09f5f0d5453d..06c5bd688c1d4 100644 --- a/crates/bevy_ptr/Cargo.toml +++ b/crates/bevy_ptr/Cargo.toml @@ -9,3 +9,6 @@ license = "MIT OR Apache-2.0" keywords = ["bevy", "no_std"] [dependencies] + +[lints] +workspace = true diff --git a/crates/bevy_ptr/src/lib.rs b/crates/bevy_ptr/src/lib.rs index f6212c505ba70..7a98d53b9f018 100644 --- a/crates/bevy_ptr/src/lib.rs +++ b/crates/bevy_ptr/src/lib.rs @@ -1,7 +1,6 @@ #![doc = include_str!("../README.md")] #![no_std] #![warn(missing_docs)] -#![allow(clippy::type_complexity)] use core::fmt::{self, Formatter, Pointer}; use core::{ diff --git a/crates/bevy_reflect/Cargo.toml b/crates/bevy_reflect/Cargo.toml index ecf925cf019ae..80a85b8063b9b 100644 --- a/crates/bevy_reflect/Cargo.toml +++ b/crates/bevy_reflect/Cargo.toml @@ -47,3 +47,6 @@ bincode = "1.3" name = "reflect_docs" path = "examples/reflect_docs.rs" required-features = ["documentation"] + +[lints] +workspace = true diff --git a/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml b/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml index 0950536e31796..6caf9948a374c 100644 --- a/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml +++ b/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml @@ -23,3 +23,6 @@ syn = { version = "2.0", features = ["full"] } proc-macro2 = "1.0" quote = "1.0" uuid = { version = "1.1", features = ["v4"] } + +[lints] +workspace = true diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs index 1a02cf4ed838d..84aae3675fc4f 100644 --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -464,7 +464,6 @@ //! [orphan rule]: https://doc.rust-lang.org/book/ch10-02-traits.html#implementing-a-trait-on-a-type:~:text=But%20we%20can%E2%80%99t,implementation%20to%20use. //! [`bevy_reflect_derive/documentation`]: bevy_reflect_derive //! [derive `Reflect`]: derive@crate::Reflect -#![allow(clippy::type_complexity)] mod array; mod fields; diff --git a/crates/bevy_render/Cargo.toml b/crates/bevy_render/Cargo.toml index be65412bcb773..caac932cf0495 100644 --- a/crates/bevy_render/Cargo.toml +++ b/crates/bevy_render/Cargo.toml @@ -96,3 +96,6 @@ web-sys = { version = "0.3", features = [ 'Window', ] } wasm-bindgen = "0.2" + +[lints] +workspace = true diff --git a/crates/bevy_render/macros/Cargo.toml b/crates/bevy_render/macros/Cargo.toml index 6bd810a310bb9..368077ef07b1d 100644 --- a/crates/bevy_render/macros/Cargo.toml +++ b/crates/bevy_render/macros/Cargo.toml @@ -17,3 +17,6 @@ bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.12.0" } syn = "2.0" proc-macro2 = "1.0" quote = "1.0" + +[lints] +workspace = true diff --git a/crates/bevy_render/src/lib.rs b/crates/bevy_render/src/lib.rs index 4f06c11e0291d..cde3062c480cd 100644 --- a/crates/bevy_render/src/lib.rs +++ b/crates/bevy_render/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - #[cfg(target_pointer_width = "16")] compile_error!("bevy_render cannot compile for a 16-bit platform."); diff --git a/crates/bevy_scene/Cargo.toml b/crates/bevy_scene/Cargo.toml index b9997dc9dd9fa..9732d8c05318f 100644 --- a/crates/bevy_scene/Cargo.toml +++ b/crates/bevy_scene/Cargo.toml @@ -33,3 +33,6 @@ thiserror = "1.0" postcard = { version = "1.0", features = ["alloc"] } bincode = "1.3" rmp-serde = "1.1" + +[lints] +workspace = true diff --git a/crates/bevy_scene/src/lib.rs b/crates/bevy_scene/src/lib.rs index 5e6dceace58f6..cb4988c8be8b1 100644 --- a/crates/bevy_scene/src/lib.rs +++ b/crates/bevy_scene/src/lib.rs @@ -4,7 +4,6 @@ //! instantiated or removed from a world to allow composition. Scenes can be serialized/deserialized, //! for example to save part of the world state to a file. -#![allow(clippy::type_complexity)] #![warn(missing_docs)] mod bundle; diff --git a/crates/bevy_sprite/Cargo.toml b/crates/bevy_sprite/Cargo.toml index 9b211f9d41ebf..ec2081d05aabb 100644 --- a/crates/bevy_sprite/Cargo.toml +++ b/crates/bevy_sprite/Cargo.toml @@ -35,3 +35,6 @@ thiserror = "1.0" rectangle-pack = "0.4" bitflags = "2.3" radsort = "0.1" + +[lints] +workspace = true diff --git a/crates/bevy_sprite/src/lib.rs b/crates/bevy_sprite/src/lib.rs index 9f68a9a3b981e..ce5b12e6a5c89 100644 --- a/crates/bevy_sprite/src/lib.rs +++ b/crates/bevy_sprite/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - mod bundle; mod dynamic_texture_atlas_builder; mod mesh2d; diff --git a/crates/bevy_tasks/Cargo.toml b/crates/bevy_tasks/Cargo.toml index 6d52a0d4de575..d208f92450e45 100644 --- a/crates/bevy_tasks/Cargo.toml +++ b/crates/bevy_tasks/Cargo.toml @@ -24,3 +24,6 @@ wasm-bindgen-futures = "0.4" [dev-dependencies] instant = { version = "0.1", features = ["wasm-bindgen"] } + +[lints] +workspace = true diff --git a/crates/bevy_tasks/src/lib.rs b/crates/bevy_tasks/src/lib.rs index 4d2786e41a0c7..c1725d2b8b5fe 100644 --- a/crates/bevy_tasks/src/lib.rs +++ b/crates/bevy_tasks/src/lib.rs @@ -1,5 +1,4 @@ #![warn(missing_docs)] -#![allow(clippy::type_complexity)] #![doc = include_str!("../README.md")] mod slice; diff --git a/crates/bevy_text/Cargo.toml b/crates/bevy_text/Cargo.toml index 1237443d78634..8218b578fb6e1 100644 --- a/crates/bevy_text/Cargo.toml +++ b/crates/bevy_text/Cargo.toml @@ -30,3 +30,6 @@ ab_glyph = "0.2.6" glyph_brush_layout = "0.2.1" thiserror = "1.0" serde = {version = "1", features = ["derive"]} + +[lints] +workspace = true diff --git a/crates/bevy_text/src/lib.rs b/crates/bevy_text/src/lib.rs index 6a1981fa6110b..bdbc1e168377e 100644 --- a/crates/bevy_text/src/lib.rs +++ b/crates/bevy_text/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - mod error; mod font; mod font_atlas; diff --git a/crates/bevy_time/Cargo.toml b/crates/bevy_time/Cargo.toml index b8a47ac9699a2..9013a624af8e2 100644 --- a/crates/bevy_time/Cargo.toml +++ b/crates/bevy_time/Cargo.toml @@ -24,3 +24,6 @@ bevy_utils = { path = "../bevy_utils", version = "0.12.0" } crossbeam-channel = "0.5.0" serde = { version = "1", features = ["derive"], optional = true } thiserror = "1.0" + +[lints] +workspace = true diff --git a/crates/bevy_time/src/lib.rs b/crates/bevy_time/src/lib.rs index d5611ec58ec36..2d47acf06b60c 100644 --- a/crates/bevy_time/src/lib.rs +++ b/crates/bevy_time/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] #![doc = include_str!("../README.md")] diff --git a/crates/bevy_transform/Cargo.toml b/crates/bevy_transform/Cargo.toml index 5ad19c096e8c6..344e25b0364d5 100644 --- a/crates/bevy_transform/Cargo.toml +++ b/crates/bevy_transform/Cargo.toml @@ -25,3 +25,6 @@ glam = { version = "0.24", features = ["approx"] } [features] serialize = ["dep:serde", "bevy_math/serialize"] + +[lints] +workspace = true diff --git a/crates/bevy_transform/src/lib.rs b/crates/bevy_transform/src/lib.rs index 5c176c4b8bbc2..db7d1805a80bb 100644 --- a/crates/bevy_transform/src/lib.rs +++ b/crates/bevy_transform/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] #![warn(clippy::undocumented_unsafe_blocks)] #![doc = include_str!("../README.md")] diff --git a/crates/bevy_ui/Cargo.toml b/crates/bevy_ui/Cargo.toml index b6dd346f955ec..b92213b63ec4c 100644 --- a/crates/bevy_ui/Cargo.toml +++ b/crates/bevy_ui/Cargo.toml @@ -36,3 +36,6 @@ serde = { version = "1", features = ["derive"] } smallvec = { version = "1.6", features = ["union", "const_generics"] } bytemuck = { version = "1.5", features = ["derive"] } thiserror = "1.0.0" + +[lints] +workspace = true diff --git a/crates/bevy_ui/src/lib.rs b/crates/bevy_ui/src/lib.rs index e72eb5ea777d2..f8b2597cc2088 100644 --- a/crates/bevy_ui/src/lib.rs +++ b/crates/bevy_ui/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - //! This crate contains Bevy's UI system, which can be used to create UI for both 2D and 3D games //! # Basic usage //! Spawn UI elements with [`node_bundles::ButtonBundle`], [`node_bundles::ImageBundle`], [`node_bundles::TextBundle`] and [`node_bundles::NodeBundle`] diff --git a/crates/bevy_utils/Cargo.toml b/crates/bevy_utils/Cargo.toml index 8e94bff4d8ad3..bf1eea4b5f069 100644 --- a/crates/bevy_utils/Cargo.toml +++ b/crates/bevy_utils/Cargo.toml @@ -24,3 +24,6 @@ nonmax = "0.5" [target.'cfg(target_arch = "wasm32")'.dependencies] getrandom = { version = "0.2.0", features = ["js"] } + +[lints] +workspace = true diff --git a/crates/bevy_utils/macros/Cargo.toml b/crates/bevy_utils/macros/Cargo.toml index 8a9cb4293f230..fb65c66475555 100644 --- a/crates/bevy_utils/macros/Cargo.toml +++ b/crates/bevy_utils/macros/Cargo.toml @@ -12,3 +12,6 @@ proc-macro = true syn = "2.0" quote = "1.0" proc-macro2 = "1.0" + +[lints] +workspace = true diff --git a/crates/bevy_utils/src/lib.rs b/crates/bevy_utils/src/lib.rs index fc0ec1c125c73..534edbd76218c 100644 --- a/crates/bevy_utils/src/lib.rs +++ b/crates/bevy_utils/src/lib.rs @@ -2,7 +2,7 @@ //! //! [Bevy]: https://bevyengine.org/ //! -#![allow(clippy::type_complexity)] + #![warn(missing_docs)] #![warn(clippy::undocumented_unsafe_blocks)] diff --git a/crates/bevy_window/Cargo.toml b/crates/bevy_window/Cargo.toml index 0f2af8438936d..5743d1ebf555d 100644 --- a/crates/bevy_window/Cargo.toml +++ b/crates/bevy_window/Cargo.toml @@ -28,3 +28,6 @@ raw-window-handle = "0.5" # other serde = { version = "1.0", features = ["derive"], optional = true } + +[lints] +workspace = true diff --git a/crates/bevy_window/src/lib.rs b/crates/bevy_window/src/lib.rs index f1e8a304c52a5..3846814097388 100644 --- a/crates/bevy_window/src/lib.rs +++ b/crates/bevy_window/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] //! `bevy_window` provides a platform-agnostic interface for windowing in Bevy. //! diff --git a/crates/bevy_winit/Cargo.toml b/crates/bevy_winit/Cargo.toml index 3e0df9e2b99f0..b3fc28ab47340 100644 --- a/crates/bevy_winit/Cargo.toml +++ b/crates/bevy_winit/Cargo.toml @@ -45,3 +45,6 @@ crossbeam-channel = "0.5" [package.metadata.docs.rs] features = ["x11"] + +[lints] +workspace = true diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs index 1241717bb5dd1..7d531a281a432 100644 --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] //! `bevy_winit` provides utilities to handle window creation and the eventloop through [`winit`] //! diff --git a/examples/2d/mesh2d_manual.rs b/examples/2d/mesh2d_manual.rs index 3e908c49fe222..a940ed142fc77 100644 --- a/examples/2d/mesh2d_manual.rs +++ b/examples/2d/mesh2d_manual.rs @@ -5,8 +5,6 @@ //! //! [`Material2d`]: bevy::sprite::Material2d -#![allow(clippy::type_complexity)] - use bevy::{ core_pipeline::core_2d::Transparent2d, prelude::*, diff --git a/examples/3d/anti_aliasing.rs b/examples/3d/anti_aliasing.rs index 255ccf00bde18..df6d6d594ef20 100644 --- a/examples/3d/anti_aliasing.rs +++ b/examples/3d/anti_aliasing.rs @@ -1,9 +1,5 @@ //! This example compares MSAA (Multi-Sample Anti-aliasing), FXAA (Fast Approximate Anti-aliasing), and TAA (Temporal Anti-aliasing). -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use std::f32::consts::PI; use bevy::{ diff --git a/examples/3d/shadow_caster_receiver.rs b/examples/3d/shadow_caster_receiver.rs index e97d29fd09b15..922aa3b02137e 100644 --- a/examples/3d/shadow_caster_receiver.rs +++ b/examples/3d/shadow_caster_receiver.rs @@ -1,9 +1,5 @@ //! Demonstrates how to prevent meshes from casting/receiving shadows in a 3d scene. -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use std::f32::consts::PI; use bevy::{ diff --git a/examples/3d/ssao.rs b/examples/3d/ssao.rs index 9253c6afbb64f..db1adcb1d8445 100644 --- a/examples/3d/ssao.rs +++ b/examples/3d/ssao.rs @@ -1,9 +1,5 @@ //! A scene showcasing screen space ambient occlusion. -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use bevy::{ core_pipeline::experimental::taa::{TemporalAntiAliasBundle, TemporalAntiAliasPlugin}, pbr::{ diff --git a/examples/3d/transmission.rs b/examples/3d/transmission.rs index 80400e662936f..d2dd671943f7a 100644 --- a/examples/3d/transmission.rs +++ b/examples/3d/transmission.rs @@ -18,10 +18,6 @@ //! | `D` | Toggle Depth Prepass | //! | `T` | Toggle TAA | -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use std::f32::consts::PI; use bevy::{ diff --git a/examples/ecs/custom_query_param.rs b/examples/ecs/custom_query_param.rs index 81a6d8cfa718a..8cc5f172073b9 100644 --- a/examples/ecs/custom_query_param.rs +++ b/examples/ecs/custom_query_param.rs @@ -12,10 +12,6 @@ //! //! For more details on the `WorldQuery` derive macro, see the trait documentation. -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use bevy::{ecs::query::WorldQuery, prelude::*}; use std::fmt::Debug; diff --git a/examples/ecs/state.rs b/examples/ecs/state.rs index 5b220c7851efa..c4603196f461b 100644 --- a/examples/ecs/state.rs +++ b/examples/ecs/state.rs @@ -5,10 +5,6 @@ //! //! In this case, we're transitioning from a `Menu` state to an `InGame` state. -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use bevy::prelude::*; fn main() { diff --git a/examples/games/alien_cake_addict.rs b/examples/games/alien_cake_addict.rs index f01769f2fc1c7..12b2753229b58 100644 --- a/examples/games/alien_cake_addict.rs +++ b/examples/games/alien_cake_addict.rs @@ -1,9 +1,5 @@ //! Eat the cakes. Eat them all. An example 3D game. -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use std::f32::consts::PI; use bevy::prelude::*; diff --git a/examples/games/game_menu.rs b/examples/games/game_menu.rs index 226317685c0b9..5b4b5a2457c81 100644 --- a/examples/games/game_menu.rs +++ b/examples/games/game_menu.rs @@ -2,10 +2,6 @@ //! change some settings or quit. There is no actual game, it will just display the current //! settings for 5 seconds before going back to the menu. -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use bevy::prelude::*; const TEXT_COLOR: Color = Color::rgb(0.9, 0.9, 0.9); diff --git a/examples/input/text_input.rs b/examples/input/text_input.rs index b6e9ad5b04735..a0b301b329fcb 100644 --- a/examples/input/text_input.rs +++ b/examples/input/text_input.rs @@ -4,10 +4,6 @@ //! Clicking toggle IME (Input Method Editor) support, but the font used as limited support of characters. //! You should change the provided font with another one to test other languages input. -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use bevy::{input::keyboard::KeyboardInput, prelude::*}; fn main() { diff --git a/examples/mobile/Cargo.toml b/examples/mobile/Cargo.toml index 02c7d3f8a3363..194970d0728c9 100644 --- a/examples/mobile/Cargo.toml +++ b/examples/mobile/Cargo.toml @@ -29,3 +29,5 @@ target_sdk_version = 31 icon = "@mipmap/ic_launcher" label = "Bevy Example" +[lints] +workspace = true diff --git a/examples/mobile/src/lib.rs b/examples/mobile/src/lib.rs index a4715c43689b0..7d36803928b33 100644 --- a/examples/mobile/src/lib.rs +++ b/examples/mobile/src/lib.rs @@ -1,7 +1,3 @@ -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use bevy::{ input::touch::TouchPhase, prelude::*, diff --git a/examples/tools/scene_viewer/scene_viewer_plugin.rs b/examples/tools/scene_viewer/scene_viewer_plugin.rs index 3a41efe069cb0..3dd6b1273c834 100644 --- a/examples/tools/scene_viewer/scene_viewer_plugin.rs +++ b/examples/tools/scene_viewer/scene_viewer_plugin.rs @@ -3,10 +3,6 @@ //! - Copy the code for the `SceneViewerPlugin` and add the plugin to your App. //! - Insert an initialized `SceneHandle` resource into your App's `AssetServer`. -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use bevy::{ asset::LoadState, gltf::Gltf, input::common_conditions::input_just_pressed, prelude::*, scene::InstanceId, diff --git a/examples/ui/button.rs b/examples/ui/button.rs index 5e37068572b6a..27ab4a19a12d5 100644 --- a/examples/ui/button.rs +++ b/examples/ui/button.rs @@ -1,10 +1,6 @@ //! This example illustrates how to create a button that changes color and text based on its //! interaction state. -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use bevy::{prelude::*, winit::WinitSettings}; fn main() {