We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Trait inheritance allows traits to require other traits, but explicitly including all required traits in functions or impl's can become repetitive.
impl
Once #6314 is fixed, support some version of trait aliases, e.g., by desugaring a trait alias declaration:
trait Baz = Foo + Bar;
into (approximately):
trait Baz: Foo + Bar {} impl<T> Baz for T where T: Foo + Bar {}
Either support something similar to this experimental Rust feature or else ensure that it can be implemented with a simple Noir macro.
Yes
trait Baz: Foo + Bar {} can currently be defined, but currently needs an explicit impl Baz for MyStruct for each type
trait Baz: Foo + Bar {}
impl Baz for MyStruct
No response
None
The text was updated successfully, but these errors were encountered:
After discussing with Tom and Jake, we'd prefer to implement Rust-style trait aliases with the following notes:
Sorry, something went wrong.
michaeljklein
Successfully merging a pull request may close this issue.
Problem
Trait inheritance allows traits to require other traits, but explicitly including all required traits in functions or
impl
's can become repetitive.Happy Case
Once #6314 is fixed, support some version of trait aliases, e.g., by desugaring a trait alias declaration:
into (approximately):
Either support something similar to this experimental Rust feature or else ensure that it can be implemented with a simple Noir macro.
Workaround
Yes
Workaround Description
trait Baz: Foo + Bar {}
can currently be defined, but currently needs an explicitimpl Baz for MyStruct
for each typeAdditional Context
No response
Project Impact
None
Blocker Context
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: