Skip to content

Commit

Permalink
chore: fix typo in ResolverError::AbiAttributeOutsideContract (#4933)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*

Fixes a typo in an error variant.

## Additional Context



## Documentation\*

Check one:
- [ ] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.

# PR Checklist\*

- [ ] I have tested the changes locally.
- [ ] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
TomAFrench authored May 1, 2024
1 parent 25080f3 commit 76d933b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 76d933b

Please sign in to comment.