Skip to content

Commit

Permalink
Rollup merge of rust-lang#58589 - matklad:remove-hack, r=petrochenkov
Browse files Browse the repository at this point in the history
cleanup macro after 2018 transition

We can now use `?`
  • Loading branch information
Centril authored Feb 22, 2019
2 parents bb36117 + 65622e3 commit e8cf01b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/libsyntax/ext/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ macro_rules! ast_fragments {
(
$($Kind:ident($AstTy:ty) {
$kind_name:expr;
// FIXME: HACK: this should be `$(one ...)?` and `$(many ...)?` but `?` macro
// repetition was removed from 2015 edition in #51587 because of ambiguities.
$(one fn $mut_visit_ast:ident; fn $visit_ast:ident;)*
$(many fn $flat_map_ast_elt:ident; fn $visit_ast_elt:ident;)*
$(one fn $mut_visit_ast:ident; fn $visit_ast:ident;)?
$(many fn $flat_map_ast_elt:ident; fn $visit_ast_elt:ident;)?
fn $make_ast:ident;
})*
) => {
Expand Down

0 comments on commit e8cf01b

Please sign in to comment.