From 158d726e17f81356f4b7b539d1b3cd51f925068c Mon Sep 17 00:00:00 2001 From: ziqiaozhou Date: Fri, 15 Nov 2024 10:42:14 -0800 Subject: [PATCH] Add allow(non_snake_case) to __VERUS_CONST_BODY__ (#1344) --- source/builtin_macros/src/syntax.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/builtin_macros/src/syntax.rs b/source/builtin_macros/src/syntax.rs index 2dab1230b..766d79c86 100644 --- a/source/builtin_macros/src/syntax.rs +++ b/source/builtin_macros/src/syntax.rs @@ -661,7 +661,7 @@ impl Visitor { self.inside_ghost += 1; self.visit_expr_mut(&mut expr); self.inside_ghost -= 1; - stmts.push(Stmt::Expr(Expr::Verbatim(quote_spanned!(con_span => #[verus::internal(verus_macro)] #[verus::internal(const_body)] fn __VERUS_CONST_BODY__() -> #con_ty { #expr } )))); + stmts.push(Stmt::Expr(Expr::Verbatim(quote_spanned!(con_span => #[allow(non_snake_case)]#[verus::internal(verus_macro)] #[verus::internal(const_body)] fn __VERUS_CONST_BODY__() -> #con_ty { #expr } )))); stmts.push(Stmt::Expr(Expr::Verbatim( quote_spanned!(con_span => unsafe { core::mem::zeroed() }), )));