Latest Results
Use `HasChanges` to propagate information about in-place mutations (#7662)
## Description
This PR is a continuation of #7659 and implements first two points of
the proposed Next Steps by:
- moving `HasChanges` to a separate `has_changes` module,
- returning `HasChanges` from `ReplaceDecls`, instead of `bool`,
- returning `HasChanges` from `UpdateConstantExpression`, instead of
`()`,
- returning `HasChanges` from `MaterializeConstGenerics`, instead of
`()`.
This PR has a focus on refactoring and not on utilizing the information
provided by returned `HasChanges`. Therefore, some implementations could
be further simplified but are deliberately left as-is to be as close to
straightforward refactoring as possible. E.g.,
`materialize_const_generics` implementations, like e.g., for `TypeId`
can be simplified. Simpler implementation that also check the return
value and potentially remove additional unnecessary inserts into
`DeclEngine` will be done in a follow up PR.
## Checklist
- [x] I have linked to any relevant issues.
- [x] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers. Latest Branches
+25%
xunilrj/fix-opt-passes-convergence 0%
ironcev/add-decl-engine-stats-to-compiler-metrics -11%
ironcev/rollout-has-changes © 2026 CodSpeed Technology