diff --git a/compiler/noirc_frontend/src/hir/resolution/errors.rs b/compiler/noirc_frontend/src/hir/resolution/errors.rs index 953edc7c7d9..fa4ea96316a 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} ")] @@ -313,7 +313,7 @@ impl<'a> From<&'a ResolverError> 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 14a45a8788f..bfdc2fe37cc 100644 --- a/compiler/noirc_frontend/src/hir/resolution/resolver.rs +++ b/compiler/noirc_frontend/src/hir/resolution/resolver.rs @@ -695,7 +695,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(), }); } @@ -1280,7 +1280,7 @@ impl<'a> Resolver<'a> { && let_stmt.attributes.iter().any(|attr| matches!(attr, SecondaryAttribute::Abi(_))) { let span = let_stmt.pattern.span(); - self.push_err(ResolverError::AbiAttributeOusideContract { span }); + self.push_err(ResolverError::AbiAttributeOutsideContract { span }); } if !let_stmt.comptime && matches!(let_stmt.pattern, Pattern::Mutable(..)) {