-
Notifications
You must be signed in to change notification settings - Fork 24
Add inline const expression and pattern #17
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
Conversation
db54ee4
to
bf9091f
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.
Changes look good. Have you checked if rust-analyzer still builds with this change? I'd like to avoid having to fix any new breakage before other ungrammar changes can be incorporated.
bf9091f
to
30109a8
Compare
It does stop RA from building, in one file due to exhaustive matching and another due to the required addition to the
|
The eternal monorepo vs polyrepo question.... At one point, I was considering adding a What stops me is the accidental complexity of CI. Sadly, rust-analyzer does quite a bit in |
I think having polyrepo here is fine, the only problem should be ungrammar shouldn't it, as adding to the rust ungrammar is always a breaking change for RA I think in regards to how its syntax generation works with the |
30109a8
to
7b61d5d
Compare
7b61d5d
to
a2900d2
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.
bors r+
EffectExpr = | ||
Attr* Label? ('try' | 'unsafe' | 'async') BlockExpr | ||
Attr* Label? ('try' | 'unsafe' | 'async' | 'const') BlockExpr |
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.
tbh, I am still unsure about this structure...
Build succeeded: |
7010: Update ungrammar for const block patterns r=matklad a=Veykril Fixes #6848 Adds const blocks and const block patterns to the AST and parses them. Blocked on rust-analyzer/ungrammar#17, will merge that PR there once this one gets the OK so I can remove the local ungrammar dependency path and fix the Cargo.lock. Co-authored-by: Lukas Wirth <[email protected]>
To be able to address rust-lang/rust-analyzer#6848 in the (near) future. The name
ConstBlockPattern
was chosen since that's what the rfc calls it.CodeGen with this breaks RA in one file https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/body/lower.rs#L825, that is if the
"CONST_BLOCK_PAT"
has been added to KINDS_SRC.I figure adding this now is a good time as the rust.ungrammar is being changed for lifetimes and macros2.0 anyways.