-
Notifications
You must be signed in to change notification settings - Fork 184
Parse expression instead of literal in attributes #4016
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
ff0f136
to
0580e33
Compare
@powerboat9 I've just seen that this PR clashes with #3914 , #3914 contains some other changes I wished to work on next (rustc_allow_const_fn_unstable) is it ready to merge ? Could you bring up some PRs with some of those changes ? Should we merge this PR ? |
I'll create some PRs -- I think this PR in particular is ~equivalent to a commit I have ready, although I need to do some rebasing + conflict resolution to find that |
I've got #4018, along with a follow-up commit ready that's ~equivalent to this PR. I think I'll probably just use the latter commit to make suggestions for this PR |
44cde04
to
4f93901
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.
Otherwise, looks good. I wouldn't be noticing these if I wasn't making line-by-line comparisons with powerboat9@a690152
4f93901
to
be8b265
Compare
gcc/rust/ChangeLog: * ast/rust-ast.cc (AttributeParser::parse_path_meta_item): Parse expression instead of literal. Update variant name. (MetaItemPathLit::to_attribute): Remove function. (AttributeParser::parse_path_meta_item): Update name. (MetaItemPathLit::check_cfg_predicate): Likewise. (MetaItemPathExpr::check_cfg_predicate): Likewise. (MetaItemPathLit::accept_vis): Likewise. (MetaItemPathExpr::accept_vis): Likewise. * ast/rust-ast-collector.h: Update prototype and adapt code to new expression. * ast/rust-ast-collector.cc: Update code to expr. * ast/rust-ast-full-decls.h (class MetaItemPathLit): Likewise. (class MetaItemPathExpr): Likewise. * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise. * ast/rust-ast-visitor.h: Likewise. * ast/rust-ast.h (class MetaItemPathLit): Rename class from here... (class MetaItemPathExpr): ... to here. * ast/rust-expr.h (class MetaItemPathLit): Rename class from here... (class MetaItemPathExpr): ...to here. * expand/rust-derive.h: Update class name. * expand/rust-expand-visitor.cc (ExpandVisitor::visit): Likewise. * expand/rust-expand-visitor.h: Likewise. * hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Likewise. * hir/rust-ast-lower-base.h: Likewise. * resolve/rust-ast-resolve-base.cc (ResolverBase::visit): Likewise. * resolve/rust-ast-resolve-base.h: Likewise. * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit): Likewise. * resolve/rust-early-name-resolver.h: Likewise. * util/rust-attributes.cc (AttributeChecker::visit): Likewise. * util/rust-attributes.h: Likewise. Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
be8b265
to
c743eaa
Compare
No description provided.