Skip to content

Commit 26bb0b4

Browse files
Move #![warn(clippy::allow_attributes, clippy::allow_attributes_without_reason)] to the workspace Cargo.toml (#17374)
# Objective Fixes #17111 ## Solution Move `#![warn(clippy::allow_attributes, clippy::allow_attributes_without_reason)]` to the workspace `Cargo.toml` ## Testing Lots of CI testing, and local testing too. --------- Co-authored-by: Benjamin Brienen <benjamin.brienen@outlook.com>
1 parent 0756a19 commit 26bb0b4

File tree

55 files changed

+73
-221
lines changed

Some content is hidden

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

55 files changed

+73
-221
lines changed

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ std_instead_of_core = "warn"
5454
std_instead_of_alloc = "warn"
5555
alloc_instead_of_core = "warn"
5656

57+
allow_attributes = "warn"
58+
allow_attributes_without_reason = "warn"
59+
5760
[workspace.lints.rust]
5861
missing_docs = "warn"
5962
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(docsrs_dep)'] }
@@ -95,6 +98,9 @@ std_instead_of_core = "allow"
9598
std_instead_of_alloc = "allow"
9699
alloc_instead_of_core = "allow"
97100

101+
allow_attributes = "warn"
102+
allow_attributes_without_reason = "warn"
103+
98104
[lints.rust]
99105
missing_docs = "warn"
100106
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(docsrs_dep)'] }

benches/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ ref_as_ptr = "warn"
5656
# see: https://github.com/bevyengine/bevy/pull/15375#issuecomment-2366966219
5757
too_long_first_doc_paragraph = "allow"
5858

59+
allow_attributes = "warn"
60+
allow_attributes_without_reason = "warn"
61+
5962
[lints.rust]
6063
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(docsrs_dep)'] }
6164
unsafe_op_in_unsafe_fn = "warn"

benches/benches/bevy_ecs/components/add_remove_very_big_table.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
#![allow(dead_code)]
1+
#![expect(
2+
dead_code,
3+
reason = "The `Mat4`s in the structs are used to bloat the size of the structs for benchmarking purposes."
4+
)]
25

36
use bevy_ecs::prelude::*;
47
use glam::*;

crates/bevy_a11y/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
#![forbid(unsafe_code)]
2-
#![warn(
3-
clippy::allow_attributes,
4-
clippy::allow_attributes_without_reason,
5-
reason = "See #17111; To be removed once all crates are in-line with these attributes"
6-
)]
72
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
83
#![doc(
94
html_logo_url = "https://bevyengine.org/assets/icon.png",

crates/bevy_animation/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
22
#![forbid(unsafe_code)]
3-
#![warn(
4-
clippy::allow_attributes,
5-
clippy::allow_attributes_without_reason,
6-
reason = "See #17111; To be removed once all crates are in-line with these attributes"
7-
)]
83
#![doc(
94
html_logo_url = "https://bevyengine.org/assets/icon.png",
105
html_favicon_url = "https://bevyengine.org/assets/icon.png"

crates/bevy_app/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77
)]
88
#![cfg_attr(any(docsrs, docsrs_dep), feature(doc_auto_cfg, rustdoc_internals))]
99
#![forbid(unsafe_code)]
10-
#![warn(
11-
clippy::allow_attributes,
12-
clippy::allow_attributes_without_reason,
13-
reason = "See #17111; To be removed once all crates are in-line with these attributes"
14-
)]
1510
#![doc(
1611
html_logo_url = "https://bevyengine.org/assets/icon.png",
1712
html_favicon_url = "https://bevyengine.org/assets/icon.png"

crates/bevy_asset/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,6 @@
139139
//! This trait mirrors [`AssetLoader`] in structure, and works in tandem with [`AssetWriter`](io::AssetWriter), which mirrors [`AssetReader`](io::AssetReader).
140140
141141
#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")]
142-
#![warn(
143-
clippy::allow_attributes,
144-
clippy::allow_attributes_without_reason,
145-
reason = "See #17111; To be removed once all crates are in-line with these attributes"
146-
)]
147142
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
148143
#![doc(
149144
html_logo_url = "https://bevyengine.org/assets/icon.png",

crates/bevy_audio/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
#![forbid(unsafe_code)]
2-
#![warn(
3-
clippy::allow_attributes,
4-
clippy::allow_attributes_without_reason,
5-
reason = "See #17111; To be removed once all crates are in-line with these attributes"
6-
)]
72
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
83
#![doc(
94
html_logo_url = "https://bevyengine.org/assets/icon.png",

crates/bevy_color/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
22
#![forbid(unsafe_code)]
3-
#![warn(
4-
clippy::allow_attributes,
5-
clippy::allow_attributes_without_reason,
6-
reason = "See #17111; To be removed once all crates are in-line with these attributes"
7-
)]
83
#![doc(
94
html_logo_url = "https://bevyengine.org/assets/icon.png",
105
html_favicon_url = "https://bevyengine.org/assets/icon.png"

crates/bevy_core_pipeline/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")]
22
#![forbid(unsafe_code)]
3-
#![warn(
4-
clippy::allow_attributes,
5-
clippy::allow_attributes_without_reason,
6-
reason = "See #17111; To be removed once all crates are in-line with these attributes"
7-
)]
83
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
94
#![doc(
105
html_logo_url = "https://bevyengine.org/assets/icon.png",

0 commit comments

Comments
 (0)