-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support generic traits #3471
Comments
This would be especially useful to create a serialize trait: trait Serialize<N> {
fn serialize() -> [Field; N];
} Which we have in many data structures |
kevaundray
pushed a commit
to AztecProtocol/aztec-packages
that referenced
this issue
Jan 4, 2024
Simple use of traits in `noir-protocol-circuits` and `aztec-nr` when possible. Missing: Serialize/Deserialize due to: noir-lang/noir#3471 Renamed ::default() to ::empty(), since it better conveys meaning for our use cases (open to discussion).
AztecBot
pushed a commit
to AztecProtocol/aztec-nr
that referenced
this issue
Jan 7, 2024
Simple use of traits in `noir-protocol-circuits` and `aztec-nr` when possible. Missing: Serialize/Deserialize due to: noir-lang/noir#3471 Renamed ::default() to ::empty(), since it better conveys meaning for our use cases (open to discussion).
Maddiaa0
pushed a commit
to AztecProtocol/aztec-packages
that referenced
this issue
Jan 8, 2024
Simple use of traits in `noir-protocol-circuits` and `aztec-nr` when possible. Missing: Serialize/Deserialize due to: noir-lang/noir#3471 Renamed ::default() to ::empty(), since it better conveys meaning for our use cases (open to discussion).
github-merge-queue bot
pushed a commit
that referenced
this issue
Jan 16, 2024
# Description ## Problem\* Resolves #3471 Resolves #3474 ## Summary\* Implements support for generics on the trait directly. E.g. `trait Into<T> { ... }` ## Additional Context The old `trait_generics` test has been renamed to `trait_impl_generics` - I think this is more accurate. There is a new test in `trait_generics` now which tests the generic traits added by this PR. I've discovered two new bugs in writing this PR, which are commented in the `trait_generics` test. I'll make issues for them now. ## Documentation\* Check one: - [ ] No documentation needed. - [x] Documentation included in this PR. - [ ] **[Exceptional Case]** 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.
michaelelliot
pushed a commit
to Swoir/noir_rs
that referenced
this issue
Feb 28, 2024
Simple use of traits in `noir-protocol-circuits` and `aztec-nr` when possible. Missing: Serialize/Deserialize due to: noir-lang/noir#3471 Renamed ::default() to ::empty(), since it better conveys meaning for our use cases (open to discussion).
superstar0402
added a commit
to superstar0402/aztec-nr
that referenced
this issue
Aug 16, 2024
Simple use of traits in `noir-protocol-circuits` and `aztec-nr` when possible. Missing: Serialize/Deserialize due to: noir-lang/noir#3471 Renamed ::default() to ::empty(), since it better conveys meaning for our use cases (open to discussion).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
While generics on trait methods and trait impls on generic types are working, generics on traits directly are not supported yet.
Happy Case
The following should execute successfully:
Alternatives Considered
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered: