Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/noirc_frontend/src/hir/resolution/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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} ")]
Expand Down Expand Up @@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions compiler/noirc_frontend/src/hir/resolution/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
});
}
Expand Down Expand Up @@ -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(..)) {
Expand Down