From 290ea1553b0a0abaaae11f60fb7626d0c63d191d Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Thu, 24 Oct 2024 15:28:05 -0400 Subject: [PATCH] chore: remove unimpl. diag. filt. err. check --- naga/src/diagnostic_filter.rs | 7 ------- naga/src/front/wgsl/error.rs | 22 ---------------------- naga/src/front/wgsl/parse/mod.rs | 5 ----- 3 files changed, 34 deletions(-) diff --git a/naga/src/diagnostic_filter.rs b/naga/src/diagnostic_filter.rs index 81b7b7bc7..668ffe599 100644 --- a/naga/src/diagnostic_filter.rs +++ b/naga/src/diagnostic_filter.rs @@ -84,13 +84,6 @@ impl FilterableTriggeringRule { Self::DerivativeUniformity => Self::DERIVATIVE_UNIFORMITY, } } - - #[cfg(feature = "wgsl-in")] - pub(crate) const fn tracking_issue_num(self) -> u16 { - match self { - FilterableTriggeringRule::DerivativeUniformity => 5320, - } - } } /// A filter that modifies how diagnostics are emitted for shaders. diff --git a/naga/src/front/wgsl/error.rs b/naga/src/front/wgsl/error.rs index 428d7bad9..c3f104b2b 100644 --- a/naga/src/front/wgsl/error.rs +++ b/naga/src/front/wgsl/error.rs @@ -296,10 +296,6 @@ pub(crate) enum Error<'a> { severity_control_name_span: Span, }, DiagnosticDuplicateTriggeringRule(ConflictingDiagnosticRuleError), - DiagnosticNotYetImplemented { - triggering_rule: FilterableTriggeringRule, - span: Span, - }, } impl<'a> From for Error<'a> { @@ -1047,24 +1043,6 @@ impl<'a> Error<'a> { .into()], } } - Error::DiagnosticNotYetImplemented { - triggering_rule, - span, - } => ParseError { - message: format!( - "the `{}` diagnostic filter is not yet supported", - triggering_rule.to_ident() - ), - labels: vec![(span, "".into())], - notes: vec![format!( - concat!( - "Let Naga maintainers know that you ran into this at ", - ", ", - "so they can prioritize it!" - ), - triggering_rule.tracking_issue_num() - )], - }, } } } diff --git a/naga/src/front/wgsl/parse/mod.rs b/naga/src/front/wgsl/parse/mod.rs index ecafe53bb..8a966f15c 100644 --- a/naga/src/front/wgsl/parse/mod.rs +++ b/naga/src/front/wgsl/parse/mod.rs @@ -2534,13 +2534,8 @@ impl Parser { match kind { DirectiveKind::Diagnostic => { if let Some(diagnostic_filter) = self.diagnostic_filter(&mut lexer)? { - let triggering_rule = diagnostic_filter.triggering_rule; let span = self.peek_rule_span(&lexer); diagnostic_filters.add(diagnostic_filter, span)?; - Err(Error::DiagnosticNotYetImplemented { - triggering_rule, - span, - })?; } lexer.expect(Token::Separator(';'))?; }