nightly-2024-07-28: feat: Remove 'comptime or separate crate' restriction on comptime cod…
Pre-release
Pre-release
github-actions
released this
28 Jul 02:21
·
348 commits
to master
since this release
…e (#5609) # Description ## Problem\* Resolves <none, this is a bonus> ## Summary\* Removes the restriction that comptime code can only call into other comptime code or code in a separate crate. This is possible now that functions can be lazily resolved in the interpreter. This means we no longer need hacky solutions like "comptime impl" on trait impls. `comptime` itself also gets simplified from its previous two meanings of "run this at comptime" and "make this visible to other comptime code" to just "run this at comptime." ## Additional Context I've also snuck in a sneaky ordering change where we run annotations on traits before annotations on structs. Function annotations are still run last. ## 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.