diff --git a/crates/bevy_gizmos/src/gizmos.rs b/crates/bevy_gizmos/src/gizmos.rs index 3580b41b61..04f5404c8d 100644 --- a/crates/bevy_gizmos/src/gizmos.rs +++ b/crates/bevy_gizmos/src/gizmos.rs @@ -182,7 +182,10 @@ where state: as SystemParam>::State, } -#[allow(unsafe_code)] +#[expect( + unsafe_code, + reason = "We cannot implement SystemParam without using unsafe code." +)] // SAFETY: All methods are delegated to existing `SystemParam` implementations unsafe impl SystemParam for Gizmos<'_, '_, Config, Clear> where @@ -254,7 +257,10 @@ where } } -#[allow(unsafe_code)] +#[expect( + unsafe_code, + reason = "We cannot implement ReadOnlySystemParam without using unsafe code." +)] // Safety: Each field is `ReadOnlySystemParam`, and Gizmos SystemParam does not mutate world unsafe impl<'w, 's, Config, Clear> ReadOnlySystemParam for Gizmos<'w, 's, Config, Clear> where diff --git a/crates/bevy_gizmos/src/lib.rs b/crates/bevy_gizmos/src/lib.rs index a7bca0769a..82ae2c6eed 100644 --- a/crates/bevy_gizmos/src/lib.rs +++ b/crates/bevy_gizmos/src/lib.rs @@ -1,4 +1,9 @@ #![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![deny( + clippy::allow_attributes, + clippy::allow_attributes_without_reason, + reason = "See #17111; To be removed once all crates are in-line with these attributes" +)] #![doc( html_logo_url = "https://bevyengine.org/assets/icon.png", html_favicon_url = "https://bevyengine.org/assets/icon.png"