crown: Fix build warning about failed expect(non_snake_case) (#41499)

`expect` is wrong here because whether or not the resulting symbol is
snake-cased depends entirely on what is passed to the macro.

Testing: This just fixes a build warning, so should not effect
behavior.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson
2025-12-23 19:02:19 +01:00
committed by GitHub
parent 273c1d54b7
commit 0d07bbc71c

View File

@@ -48,7 +48,10 @@ pub fn in_derive_expn(span: Span) -> bool {
macro_rules! symbols {
($($s: ident)+) => {
#[derive(Clone)]
#[expect(non_snake_case)]
// We are using `allow` and not `expect` here because this depends on the arguments passed
// to the macro and there is no way to tell what they are here. Please do not change the
// following line to `expect`.
#[allow(non_snake_case)]
pub(crate) struct Symbols {
$( $s: Symbol, )+
}