Skip to content

Commit 951c9bb

Browse files
ameknitemnmaita
andauthored
Add [lints] table, fix adding #![allow(clippy::type_complexity)] everywhere (#10011)
# Objective - Fix adding `#![allow(clippy::type_complexity)]` everywhere. like #9796 ## Solution - Use the new [lints] table that will land in 1.74 (https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#lints) - inherit lint to the workspace, crates and examples. ``` [lints] workspace = true ``` ## Changelog - Bump rust version to 1.74 - Enable lints table for the workspace ```toml [workspace.lints.clippy] type_complexity = "allow" ``` - Allow type complexity for all crates and examples ```toml [lints] workspace = true ``` --------- Co-authored-by: Martín Maita <47983254+mnmaita@users.noreply.github.com>
1 parent 9c0fca0 commit 951c9bb

File tree

95 files changed

+137
-102
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+137
-102
lines changed

Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ keywords = ["game", "engine", "gamedev", "graphics", "bevy"]
1010
license = "MIT OR Apache-2.0"
1111
readme = "README.md"
1212
repository = "https://github.com/bevyengine/bevy"
13-
rust-version = "1.70.0"
13+
rust-version = "1.74.0"
1414

1515
[workspace]
1616
exclude = [
@@ -29,6 +29,12 @@ members = [
2929
"errors",
3030
]
3131

32+
[workspace.lints.clippy]
33+
type_complexity = "allow"
34+
35+
[lints]
36+
workspace = true
37+
3238
[features]
3339
default = [
3440
"animation",

crates/bevy_a11y/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ bevy_derive = { path = "../bevy_derive", version = "0.12.0" }
1515
bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" }
1616

1717
accesskit = "0.12"
18+
19+
[lints]
20+
workspace = true

crates/bevy_a11y/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! Accessibility for Bevy
22
33
#![warn(missing_docs)]
4-
#![allow(clippy::type_complexity)]
54
#![forbid(unsafe_code)]
65

76
use std::sync::{

crates/bevy_animation/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ bevy_utils = { path = "../bevy_utils", version = "0.12.0" }
2121
bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" }
2222
bevy_transform = { path = "../bevy_transform", version = "0.12.0" }
2323
bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0" }
24+
25+
[lints]
26+
workspace = true

crates/bevy_animation/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! Animation for the game engine Bevy
22
33
#![warn(missing_docs)]
4-
#![allow(clippy::type_complexity)]
54

65
use std::ops::Deref;
76
use std::time::Duration;

crates/bevy_app/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ downcast-rs = "1.2.0"
3232
wasm-bindgen = { version = "0.2" }
3333
web-sys = { version = "0.3", features = [ "Window" ] }
3434

35+
[lints]
36+
workspace = true

crates/bevy_app/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! This crate is about everything concerning the highest-level, application layer of a Bevy app.
22
33
#![warn(missing_docs)]
4-
#![allow(clippy::type_complexity)]
54

65
mod app;
76
mod main_schedule;

crates/bevy_asset/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,6 @@ notify-debouncer-full = { version = "0.3.1", optional = true }
5353

5454
[dev-dependencies]
5555
bevy_core = { path = "../bevy_core", version = "0.12.0" }
56+
57+
[lints]
58+
workspace = true

crates/bevy_asset/macros/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.12.0" }
1717
syn = "2.0"
1818
proc-macro2 = "1.0"
1919
quote = "1.0"
20+
21+
[lints]
22+
workspace = true

crates/bevy_asset/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(clippy::type_complexity)]
2-
31
pub mod io;
42
pub mod meta;
53
pub mod processor;

0 commit comments

Comments
 (0)