From c18d178e520082706b347f85a5df9a02139b16b7 Mon Sep 17 00:00:00 2001 From: TilakMaddy Date: Sat, 14 Dec 2024 00:37:00 +0530 Subject: [PATCH] fix --- crates/sema/src/ast_passes.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/sema/src/ast_passes.rs b/crates/sema/src/ast_passes.rs index a1073462..f80e6d31 100644 --- a/crates/sema/src/ast_passes.rs +++ b/crates/sema/src/ast_passes.rs @@ -227,7 +227,7 @@ impl<'ast> Visit<'ast> for AstValidator<'_, 'ast> { } for item in contract.body.iter() { if let ast::ItemKind::Variable(var) = &item.kind { - if !var.mutability.is_some_and(|m| m == ast::VarMut::Constant) { + if !var.mutability.is_some_and(|m| m.is_constant()) { self.dcx() .err("library cannot have non-constant state variable") .span(var.span)