Skip to content

Commit cb586c7

Browse files
chore: warn on clippy::allow_attributes under REPO_MSRV
1 parent 8a3142a commit cb586c7

File tree

6 files changed

+22
-15
lines changed

6 files changed

+22
-15
lines changed

examples/src/lib.rs

+1
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

+1-1
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl Instance {
112112
///
113113
/// If no backend feature for the active target platform is enabled,
114114
/// this method will panic, see [`Instance::enabled_backend_features()`].
115-
#[allow(unreachable_code)]
115+
#[allow(clippy::allow_attributes, unreachable_code)]
116116
pub fn new(_instance_desc: &InstanceDescriptor) -> Self {
117117
if Self::enabled_backend_features().is_empty() {
118118
panic!(

wgpu/src/backend/webgpu.rs

+1
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

+12-12
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ macro_rules! dispatch_types_inner {
572572
impl $name {
573573
#[cfg(wgpu_core)]
574574
#[inline]
575-
#[allow(unused)]
575+
#[allow(clippy::allow_attributes, unused)]
576576
pub fn as_core(&self) -> &<$wgpu_core_context as InterfaceTypes>::$subtype {
577577
match self {
578578
Self::Core(value) => value,
@@ -582,7 +582,7 @@ macro_rules! dispatch_types_inner {
582582

583583
#[cfg(wgpu_core)]
584584
#[inline]
585-
#[allow(unused)]
585+
#[allow(clippy::allow_attributes, unused)]
586586
pub fn as_core_opt(&self) -> Option<&<$wgpu_core_context as InterfaceTypes>::$subtype> {
587587
match self {
588588
Self::Core(value) => Some(value),
@@ -592,7 +592,7 @@ macro_rules! dispatch_types_inner {
592592

593593
#[cfg(webgpu)]
594594
#[inline]
595-
#[allow(unused)]
595+
#[allow(clippy::allow_attributes, unused)]
596596
pub fn as_webgpu(&self) -> &<$webgpu_context as InterfaceTypes>::$subtype {
597597
match self {
598598
Self::WebGPU(value) => value,
@@ -602,7 +602,7 @@ macro_rules! dispatch_types_inner {
602602

603603
#[cfg(webgpu)]
604604
#[inline]
605-
#[allow(unused)]
605+
#[allow(clippy::allow_attributes, unused)]
606606
pub fn as_webgpu_opt(&self) -> Option<&<$webgpu_context as InterfaceTypes>::$subtype> {
607607
match self {
608608
Self::WebGPU(value) => Some(value),
@@ -657,7 +657,7 @@ macro_rules! dispatch_types_inner {
657657
impl $name {
658658
#[cfg(wgpu_core)]
659659
#[inline]
660-
#[allow(unused)]
660+
#[allow(clippy::allow_attributes, unused)]
661661
pub fn as_core(&self) -> &<$wgpu_core_context as InterfaceTypes>::$subtype {
662662
match self {
663663
Self::Core(value) => value,
@@ -667,7 +667,7 @@ macro_rules! dispatch_types_inner {
667667

668668
#[cfg(wgpu_core)]
669669
#[inline]
670-
#[allow(unused)]
670+
#[allow(clippy::allow_attributes, unused)]
671671
pub fn as_core_mut(&mut self) -> &mut <$wgpu_core_context as InterfaceTypes>::$subtype {
672672
match self {
673673
Self::Core(value) => value,
@@ -677,7 +677,7 @@ macro_rules! dispatch_types_inner {
677677

678678
#[cfg(wgpu_core)]
679679
#[inline]
680-
#[allow(unused)]
680+
#[allow(clippy::allow_attributes, unused)]
681681
pub fn as_core_opt(&self) -> Option<&<$wgpu_core_context as InterfaceTypes>::$subtype> {
682682
match self {
683683
Self::Core(value) => Some(value),
@@ -687,7 +687,7 @@ macro_rules! dispatch_types_inner {
687687

688688
#[cfg(wgpu_core)]
689689
#[inline]
690-
#[allow(unused)]
690+
#[allow(clippy::allow_attributes, unused)]
691691
pub fn as_core_mut_opt(
692692
&mut self,
693693
) -> Option<&mut <$wgpu_core_context as InterfaceTypes>::$subtype> {
@@ -699,7 +699,7 @@ macro_rules! dispatch_types_inner {
699699

700700
#[cfg(webgpu)]
701701
#[inline]
702-
#[allow(unused)]
702+
#[allow(clippy::allow_attributes, unused)]
703703
pub fn as_webgpu(&self) -> &<$webgpu_context as InterfaceTypes>::$subtype {
704704
match self {
705705
Self::WebGPU(value) => value,
@@ -709,7 +709,7 @@ macro_rules! dispatch_types_inner {
709709

710710
#[cfg(webgpu)]
711711
#[inline]
712-
#[allow(unused)]
712+
#[allow(clippy::allow_attributes, unused)]
713713
pub fn as_webgpu_mut(&mut self) -> &mut <$webgpu_context as InterfaceTypes>::$subtype {
714714
match self {
715715
Self::WebGPU(value) => value,
@@ -719,7 +719,7 @@ macro_rules! dispatch_types_inner {
719719

720720
#[cfg(webgpu)]
721721
#[inline]
722-
#[allow(unused)]
722+
#[allow(clippy::allow_attributes, unused)]
723723
pub fn as_webgpu_opt(&self) -> Option<&<$webgpu_context as InterfaceTypes>::$subtype> {
724724
match self {
725725
Self::WebGPU(value) => Some(value),
@@ -729,7 +729,7 @@ macro_rules! dispatch_types_inner {
729729

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

wgpu/src/lib.rs

+6-1
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.githubusercontent.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)