From dd3a0468839732a9e0328e5e0c5d86a803c6000d Mon Sep 17 00:00:00 2001 From: Tom French Date: Mon, 29 Apr 2024 12:12:37 +0100 Subject: [PATCH] chore: fix typo in `ResolverError::AbiAttributeOutsideContract` --- compiler/noirc_frontend/src/hir/resolution/errors.rs | 4 ++-- compiler/noirc_frontend/src/hir/resolution/resolver.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/noirc_frontend/src/hir/resolution/errors.rs b/compiler/noirc_frontend/src/hir/resolution/errors.rs index b6bcfe6972e..fd6914ed86e 100644 --- a/compiler/noirc_frontend/src/hir/resolution/errors.rs +++ b/compiler/noirc_frontend/src/hir/resolution/errors.rs @@ -77,7 +77,7 @@ pub enum ResolverError { #[error("#[recursive] attribute is only allowed on entry points to a program")] MisplacedRecursiveAttribute { ident: Ident }, #[error("#[abi(tag)] attribute is only allowed in contracts")] - AbiAttributeOusideContract { span: Span }, + AbiAttributeOutsideContract { span: Span }, #[error("Usage of the `#[foreign]` or `#[builtin]` function attributes are not allowed outside of the Noir standard library")] LowLevelFunctionOutsideOfStdlib { ident: Ident }, #[error("Dependency cycle found, '{item}' recursively depends on itself: {cycle} ")] @@ -311,7 +311,7 @@ impl From for Diagnostic { diag.add_note("The `#[recursive]` attribute specifies to the backend whether it should use a prover which generates proofs that are friendly for recursive verification in another circuit".to_owned()); diag } - ResolverError::AbiAttributeOusideContract { span } => { + ResolverError::AbiAttributeOutsideContract { span } => { Diagnostic::simple_error( "#[abi(tag)] attributes can only be used in contracts".to_string(), "misplaced #[abi(tag)] attribute".to_string(), diff --git a/compiler/noirc_frontend/src/hir/resolution/resolver.rs b/compiler/noirc_frontend/src/hir/resolution/resolver.rs index e3b1251955c..1640576f8fe 100644 --- a/compiler/noirc_frontend/src/hir/resolution/resolver.rs +++ b/compiler/noirc_frontend/src/hir/resolution/resolver.rs @@ -648,7 +648,7 @@ impl<'a> Resolver<'a> { .iter() .any(|attr| matches!(attr, SecondaryAttribute::Abi(_))) { - self.push_err(ResolverError::AbiAttributeOusideContract { + self.push_err(ResolverError::AbiAttributeOutsideContract { span: struct_type.borrow().name.span(), }); } @@ -1228,7 +1228,7 @@ impl<'a> Resolver<'a> { if !self.in_contract && let_stmt.attributes.iter().any(|attr| matches!(attr, SecondaryAttribute::Abi(_))) { - self.push_err(ResolverError::AbiAttributeOusideContract { + self.push_err(ResolverError::AbiAttributeOutsideContract { span: let_stmt.pattern.span(), }); }