-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
impl
trait for "const generics"
#6946
Conversation
CodSpeed Performance ReportMerging #6946 will not alter performanceComparing Summary
|
75dd270
to
e234868
Compare
9226107
to
6e66cf7
Compare
6e66cf7
to
76079ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor issues and corrections, but overall it looks very good.
sway-core/src/semantic_analysis/ast_node/declaration/impl_trait.rs
Outdated
Show resolved
Hide resolved
sway-core/src/semantic_analysis/ast_node/expression/typed_expression.rs
Outdated
Show resolved
Hide resolved
b1ff9f0
to
266d427
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit but otherwise LGTM
12e03b7
to
ba56ca8
Compare
Description
This PR is part of #6860.
It implements "impl traits" for "const generics", which means syntax such as:
This also opens the space for simplifying our current implementation of
AbiEncode
for arrays. Today we implement for each size, which limits us to a specific size. With this one can have just one "impl item", and support arrays of arbitrary size.Both implementations will coexist in
codec.sw
until we stabilize "const generics".Checklist
Breaking*
orNew Feature
labels where relevant.