Rollup merge of #58589 - matklad:remove-hack, r=petrochenkov

cleanup macro after 2018 transition

We can now use `?`
This commit is contained in:
Mazdak Farrokhzad 2019-02-22 14:58:04 +01:00 committed by GitHub
commit aa3779b4e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
})*
) => {