Closed vezenovm closed 6 days ago
🚀 Deployed on https://6679df5139fd8c382cfa4791--noir-docs.netlify.app
Converting back to draft because the formatter needs updating
Converting back to draft because the formatter needs updating
The formatter was deleting the where
clause on impls. I did a quick hack to get things working. I could make it more robust but I feel it can also be done in a follow-up to improve the robustness of formatting impls in general.
We should also maybe consider committing some time to larger formatter refactors/testing again.
FYI @noir-lang/developerrelations on Noir doc changes.
Description
Problem*
Resolves #4508
Summary*
This enables the simple functionality of being able to declare a where clause directly on a struct implementation such as below:
The code above is essentially syntactic sugar where we now every method in the struct impl a where clause. As the logic for resolving trait constraints already exists this PR really just updates the parser to accept
where
clauses and during definition collection attaches them to each method in an impl.Additional Context
Documentation*
Check one:
PR Checklist*
cargo fmt
on default settings.