Skip to content

Commit d885cd4

Browse files
chore: warn on clippy::allow_attributes under REPO_MSRV
1 parent 050cef7 commit d885cd4

File tree

6 files changed

+22
-15
lines changed

6 files changed

+22
-15
lines changed

examples/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![allow(clippy::arc_with_non_send_sync)] // False positive on wasm
2+
#![warn(clippy::allow_attributes)]
23

34
pub mod framework;
45
pub mod utils;

player/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! This is a player library for WebGPU traces.
22
33
#![cfg(not(target_arch = "wasm32"))]
4-
#![warn(unsafe_op_in_unsafe_fn)]
4+
#![warn(clippy::allow_attributes, unsafe_op_in_unsafe_fn)]
55

66
use wgc::device::trace;
77

wgpu/src/api/instance.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ impl Instance {
127127
///
128128
/// If no backend feature for the active target platform is enabled,
129129
/// this method will panic, see [`Instance::enabled_backend_features()`].
130-
#[allow(unreachable_code)]
130+
#[allow(clippy::allow_attributes, unreachable_code)]
131131
pub fn new(_instance_desc: &InstanceDescriptor) -> Self {
132132
if Self::enabled_backend_features().is_empty() {
133133
panic!(

wgpu/src/backend/webgpu.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
mod defined_non_null_js_value;
44
mod ext_bindings;
5+
#[allow(clippy::allow_attributes)]
56
mod webgpu_sys;
67

78
use js_sys::Promise;

wgpu/src/dispatch.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ macro_rules! dispatch_types_inner {
575575
impl $name {
576576
#[cfg(wgpu_core)]
577577
#[inline]
578-
#[allow(unused)]
578+
#[allow(clippy::allow_attributes, unused)]
579579
pub fn as_core(&self) -> &<$wgpu_core_context as InterfaceTypes>::$subtype {
580580
match self {
581581
Self::Core(value) => value,
@@ -585,7 +585,7 @@ macro_rules! dispatch_types_inner {
585585

586586
#[cfg(wgpu_core)]
587587
#[inline]
588-
#[allow(unused)]
588+
#[allow(clippy::allow_attributes, unused)]
589589
pub fn as_core_opt(&self) -> Option<&<$wgpu_core_context as InterfaceTypes>::$subtype> {
590590
match self {
591591
Self::Core(value) => Some(value),
@@ -595,7 +595,7 @@ macro_rules! dispatch_types_inner {
595595

596596
#[cfg(webgpu)]
597597
#[inline]
598-
#[allow(unused)]
598+
#[allow(clippy::allow_attributes, unused)]
599599
pub fn as_webgpu(&self) -> &<$webgpu_context as InterfaceTypes>::$subtype {
600600
match self {
601601
Self::WebGPU(value) => value,
@@ -605,7 +605,7 @@ macro_rules! dispatch_types_inner {
605605

606606
#[cfg(webgpu)]
607607
#[inline]
608-
#[allow(unused)]
608+
#[allow(clippy::allow_attributes, unused)]
609609
pub fn as_webgpu_opt(&self) -> Option<&<$webgpu_context as InterfaceTypes>::$subtype> {
610610
match self {
611611
Self::WebGPU(value) => Some(value),
@@ -660,7 +660,7 @@ macro_rules! dispatch_types_inner {
660660
impl $name {
661661
#[cfg(wgpu_core)]
662662
#[inline]
663-
#[allow(unused)]
663+
#[allow(clippy::allow_attributes, unused)]
664664
pub fn as_core(&self) -> &<$wgpu_core_context as InterfaceTypes>::$subtype {
665665
match self {
666666
Self::Core(value) => value,
@@ -670,7 +670,7 @@ macro_rules! dispatch_types_inner {
670670

671671
#[cfg(wgpu_core)]
672672
#[inline]
673-
#[allow(unused)]
673+
#[allow(clippy::allow_attributes, unused)]
674674
pub fn as_core_mut(&mut self) -> &mut <$wgpu_core_context as InterfaceTypes>::$subtype {
675675
match self {
676676
Self::Core(value) => value,
@@ -680,7 +680,7 @@ macro_rules! dispatch_types_inner {
680680

681681
#[cfg(wgpu_core)]
682682
#[inline]
683-
#[allow(unused)]
683+
#[allow(clippy::allow_attributes, unused)]
684684
pub fn as_core_opt(&self) -> Option<&<$wgpu_core_context as InterfaceTypes>::$subtype> {
685685
match self {
686686
Self::Core(value) => Some(value),
@@ -690,7 +690,7 @@ macro_rules! dispatch_types_inner {
690690

691691
#[cfg(wgpu_core)]
692692
#[inline]
693-
#[allow(unused)]
693+
#[allow(clippy::allow_attributes, unused)]
694694
pub fn as_core_mut_opt(
695695
&mut self,
696696
) -> Option<&mut <$wgpu_core_context as InterfaceTypes>::$subtype> {
@@ -702,7 +702,7 @@ macro_rules! dispatch_types_inner {
702702

703703
#[cfg(webgpu)]
704704
#[inline]
705-
#[allow(unused)]
705+
#[allow(clippy::allow_attributes, unused)]
706706
pub fn as_webgpu(&self) -> &<$webgpu_context as InterfaceTypes>::$subtype {
707707
match self {
708708
Self::WebGPU(value) => value,
@@ -712,7 +712,7 @@ macro_rules! dispatch_types_inner {
712712

713713
#[cfg(webgpu)]
714714
#[inline]
715-
#[allow(unused)]
715+
#[allow(clippy::allow_attributes, unused)]
716716
pub fn as_webgpu_mut(&mut self) -> &mut <$webgpu_context as InterfaceTypes>::$subtype {
717717
match self {
718718
Self::WebGPU(value) => value,
@@ -722,7 +722,7 @@ macro_rules! dispatch_types_inner {
722722

723723
#[cfg(webgpu)]
724724
#[inline]
725-
#[allow(unused)]
725+
#[allow(clippy::allow_attributes, unused)]
726726
pub fn as_webgpu_opt(&self) -> Option<&<$webgpu_context as InterfaceTypes>::$subtype> {
727727
match self {
728728
Self::WebGPU(value) => Some(value),
@@ -732,7 +732,7 @@ macro_rules! dispatch_types_inner {
732732

733733
#[cfg(webgpu)]
734734
#[inline]
735-
#[allow(unused)]
735+
#[allow(clippy::allow_attributes, unused)]
736736
pub fn as_webgpu_mut_opt(
737737
&mut self,
738738
) -> Option<&mut <$webgpu_context as InterfaceTypes>::$subtype> {

wgpu/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@
1616
1717
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
1818
#![doc(html_logo_url = "https://raw.github.com/gfx-rs/wgpu/trunk/logo.png")]
19-
#![warn(missing_docs, rust_2018_idioms, unsafe_op_in_unsafe_fn)]
19+
#![warn(
20+
clippy::allow_attributes,
21+
missing_docs,
22+
rust_2018_idioms,
23+
unsafe_op_in_unsafe_fn
24+
)]
2025
#![allow(clippy::arc_with_non_send_sync)]
2126

2227
//

0 commit comments

Comments
 (0)