mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
refactor(naga): unimpl. Copy for FilterableTriggeringRule
This commit is contained in:
parent
6f528e2ebc
commit
f6f0e5dbc2
@ -54,7 +54,7 @@ impl Severity {
|
|||||||
/// A filterable triggering rule in a [`DiagnosticFilter`].
|
/// A filterable triggering rule in a [`DiagnosticFilter`].
|
||||||
///
|
///
|
||||||
/// <https://www.w3.org/TR/WGSL/#filterable-triggering-rules>
|
/// <https://www.w3.org/TR/WGSL/#filterable-triggering-rules>
|
||||||
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
|
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
|
||||||
#[cfg_attr(feature = "serialize", derive(Serialize))]
|
#[cfg_attr(feature = "serialize", derive(Serialize))]
|
||||||
#[cfg_attr(feature = "deserialize", derive(Deserialize))]
|
#[cfg_attr(feature = "deserialize", derive(Deserialize))]
|
||||||
#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
|
#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
|
||||||
@ -140,7 +140,7 @@ impl DiagnosticFilterMap {
|
|||||||
triggering_rule,
|
triggering_rule,
|
||||||
} = diagnostic_filter;
|
} = diagnostic_filter;
|
||||||
|
|
||||||
match diagnostic_filters.entry(triggering_rule) {
|
match diagnostic_filters.entry(triggering_rule.clone()) {
|
||||||
Entry::Vacant(entry) => {
|
Entry::Vacant(entry) => {
|
||||||
entry.insert((new_severity, span));
|
entry.insert((new_severity, span));
|
||||||
}
|
}
|
||||||
@ -245,11 +245,11 @@ impl DiagnosticFilterNode {
|
|||||||
let node = &arena[handle];
|
let node = &arena[handle];
|
||||||
let &Self { ref inner, parent } = node;
|
let &Self { ref inner, parent } = node;
|
||||||
let &DiagnosticFilter {
|
let &DiagnosticFilter {
|
||||||
triggering_rule: rule,
|
triggering_rule: ref rule,
|
||||||
new_severity,
|
new_severity,
|
||||||
} = inner;
|
} = inner;
|
||||||
|
|
||||||
if rule == triggering_rule {
|
if rule == &triggering_rule {
|
||||||
return new_severity;
|
return new_severity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ impl FilterableTriggeringRule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Maps this [`FilterableTriggeringRule`] into the sentinel word associated with it in WGSL.
|
/// Maps this [`FilterableTriggeringRule`] into the sentinel word associated with it in WGSL.
|
||||||
pub const fn to_wgsl_ident(self) -> &'static str {
|
pub const fn to_wgsl_ident(&self) -> &'static str {
|
||||||
match self {
|
match self {
|
||||||
Self::DerivativeUniformity => Self::DERIVATIVE_UNIFORMITY,
|
Self::DerivativeUniformity => Self::DERIVATIVE_UNIFORMITY,
|
||||||
}
|
}
|
||||||
|
@ -1034,7 +1034,7 @@ impl<'a> Error<'a> {
|
|||||||
.into()],
|
.into()],
|
||||||
},
|
},
|
||||||
Error::DiagnosticDuplicateTriggeringRule(ConflictingDiagnosticRuleError {
|
Error::DiagnosticDuplicateTriggeringRule(ConflictingDiagnosticRuleError {
|
||||||
triggering_rule,
|
ref triggering_rule,
|
||||||
triggering_rule_spans,
|
triggering_rule_spans,
|
||||||
}) => {
|
}) => {
|
||||||
let [first_span, second_span] = triggering_rule_spans;
|
let [first_span, second_span] = triggering_rule_spans;
|
||||||
|
Loading…
Reference in New Issue
Block a user