Conversation
Bump `rustc-ap-syntax` and `rustc-ap-rustc_errors` to `57.0.0`.
With some refactorings to avoid duplicated code.
`ast::Visibility` is changed to `codemap::Spanned` whose node is `ast::VisibilityKind`. This commit fixes it. Closes rust-lang#2398.
`ast::Arm` used to have `beginning_vert` field whose type is `Option<Span>` and holds a span of the beginning `|` if available. This field is now removed. This commit works around that. Since we only need a `BytePos` of the `|`, the type of `beginning_vert` in `ArmWrapper` is `Option<BytePos>`.
|
I think that we should periodically update |
Yeah, I think that would be good. I would like to update regularly, but leave any new syntax as |
nrc
left a comment
There was a problem hiding this comment.
Thanks! Looks good other than the minor code style query.
src/expr.rs
Outdated
| else_block: Option<&'a ast::Expr>, | ||
| label: Option<ast::Label>, | ||
| pat: Option<&'a ast::Pat>, | ||
| pats: Option<Vec<&'a ast::Pat>>, |
There was a problem hiding this comment.
Do we need to have an Option<Vec<_>> here? Is there a difference between None and an empty Vec?
There was a problem hiding this comment.
No, I blindly added Vec to the previous definition, but a simple Vec<_> is enough.
|
Thank you for your review! I have updated the PR to use |
This PR updates
rustc-ap-syntaxto the latest version (currently58.0.0), and fixes some breaking changes:beginning_vertfield is removed fromast::Arm.ast::Visibilityis changed toSpanned.if letandwhile let.Closes #2398.
Closes #2511.