syntax: Unsupport foo! bar { ... } macros in the parser#62258
syntax: Unsupport foo! bar { ... } macros in the parser#62258bors merged 2 commits intorust-lang:masterfrom
foo! bar { ... } macros in the parser#62258Conversation
|
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
Centril
left a comment
There was a problem hiding this comment.
r=me with or without nits.
|
r? @Centril |
|
cc @rust-lang/lang This PR lets one define macros named While from an implementation point of view this seems reasonable (treating That said, I think we can land this PR as-is, and revert it later if we really don't want to do this. |
|
Two notes:
|
|
@petrochenkov Oh, and that Like I said, I think we should just land it and if anyone has any concerns, they can be raised async. |
Yes, |
Unreserve `macro_rules` as a macro name
|
@bors r=Centril |
|
📌 Commit d0dc41a has been approved by |
|
Removing nomination per @eddyb's note re. async and since the whole team was pinged. (It's clear to me that this is a slam dunk) |
syntax: Unsupport `foo! bar { ... }` macros in the parser
Their support in expansion was removed in rust-lang#61606.
Also un-reserve `macro_rules` as a macro name, there's no ambiguity between `macro_rules` definitions and macro calls (it also wasn't reserved correctly).
cc rust-lang/wg-grammar#51
syntax: Unsupport `foo! bar { ... }` macros in the parser
Their support in expansion was removed in rust-lang#61606.
Also un-reserve `macro_rules` as a macro name, there's no ambiguity between `macro_rules` definitions and macro calls (it also wasn't reserved correctly).
cc rust-lang/wg-grammar#51
syntax: Unsupport `foo! bar { ... }` macros in the parser
Their support in expansion was removed in rust-lang#61606.
Also un-reserve `macro_rules` as a macro name, there's no ambiguity between `macro_rules` definitions and macro calls (it also wasn't reserved correctly).
cc rust-lang/wg-grammar#51
syntax: Unsupport `foo! bar { ... }` macros in the parser
Their support in expansion was removed in rust-lang#61606.
Also un-reserve `macro_rules` as a macro name, there's no ambiguity between `macro_rules` definitions and macro calls (it also wasn't reserved correctly).
cc rust-lang/wg-grammar#51
Rollup of 17 pull requests Successful merges: - #62039 (Remove needless lifetimes (rustc)) - #62153 (Update the `rust-installer` submodule) - #62173 (rename InterpretCx -> InterpCx) - #62240 (wfcheck: resolve the type-vars in `AdtField` types) - #62249 (Use mem::take instead of mem::replace with default) - #62252 (Update mem::replace example to not be identical to mem::take) - #62258 (syntax: Unsupport `foo! bar { ... }` macros in the parser) - #62268 (Clean up inherent_impls) - #62287 (Use link attributes on extern "C" blocks with llvm-libuwind) - #62295 (miri realloc: do not require giving old size+align) - #62297 (refactor check_for_substitution) - #62316 (When possible without changing semantics, implement Iterator::last in terms of DoubleEndedIterator::next_back for types in liballoc and libcore.) - #62317 (Migrate `compile-pass` annotations to `build-pass`) - #62337 (Fix bucket in CPU usage script) - #62344 (simplify Option::get_or_insert) - #62346 (enable a few more tests in Miri and update the comment for others) - #62351 (remove bogus example from drop_in_place) Failed merges: r? @ghost
syntax: Unsupport `foo! bar { ... }` macros in the parser
Their support in expansion was removed in rust-lang#61606.
Also un-reserve `macro_rules` as a macro name, there's no ambiguity between `macro_rules` definitions and macro calls (it also wasn't reserved correctly).
cc rust-lang/wg-grammar#51
Rollup of 16 pull requests Successful merges: - #62039 (Remove needless lifetimes (rustc)) - #62173 (rename InterpretCx -> InterpCx) - #62240 (wfcheck: resolve the type-vars in `AdtField` types) - #62249 (Use mem::take instead of mem::replace with default) - #62252 (Update mem::replace example to not be identical to mem::take) - #62258 (syntax: Unsupport `foo! bar { ... }` macros in the parser) - #62268 (Clean up inherent_impls) - #62287 (Use link attributes on extern "C" blocks with llvm-libuwind) - #62295 (miri realloc: do not require giving old size+align) - #62297 (refactor check_for_substitution) - #62316 (When possible without changing semantics, implement Iterator::last in terms of DoubleEndedIterator::next_back for types in liballoc and libcore.) - #62317 (Migrate `compile-pass` annotations to `build-pass`) - #62337 (Fix bucket in CPU usage script) - #62344 (simplify Option::get_or_insert) - #62346 (enable a few more tests in Miri and update the comment for others) - #62351 (remove bogus example from drop_in_place) Failed merges: r? @ghost
This is now unsupported and treated as a hard syntax error. cc rust-lang/rust#62258.
Their support in expansion was removed in #61606.
Also un-reserve
macro_rulesas a macro name, there's no ambiguity betweenmacro_rulesdefinitions and macro calls (it also wasn't reserved correctly).cc rust-lang/wg-grammar#51