Skip to content

nightly-2024-04-26: feat: Add `#[inline(tag)]` attribute and codegen (#4913)

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 26 Apr 02:13
· 1316 commits to master since this release
1ec9cdc
# Description

## Problem\*

Resolves #4910 

## Summary\*

We add a new attribute `Inline(String)`. Currently we only support one
`InlineType` variant of `Never`. This PR also moves `InlineType` into
the monomorphization ast as its functionality is expected to be shared
across various frontend passes as well as the SSA/ACIR gen.

## Additional Context

I know there is some plans to split the AST off into its own crate as
per (https://github.com/noir-lang/noir/issues/4852). This change
shouldn't affect make the split much more dififcult as the evaluator
already depends on the AST as the issue mentions and this `InlineType`
is pretty isolated in its usage.

## Documentation\*

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

# PR Checklist\*

- [X] I have tested the changes locally.
- [X] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.

---------

Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>