Skip to content
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

Forbid user-defined macros named "macro_rules" #36730

Merged
merged 1 commit into from
Sep 26, 2016

Conversation

jseyfried
Copy link
Contributor

@jseyfried jseyfried commented Sep 26, 2016

This is a [breaking-change].
r? @nrc

@jseyfried
Copy link
Contributor Author

jseyfried commented Sep 26, 2016

If users can define their own macro_rules, we have to treat all macro_rules!-defined macros as macro-expanded macros (w.r.t. the shadowing rules in rust-lang/rfcs#1560), so we wouldn't be able to backport the shadowing restrictions.

This would mean, for example, that a 1.0 macro wouldn't be able to use macros from other crates in its expansion (cc #35896).

@nrc
Copy link
Member

nrc commented Sep 26, 2016

@bors: r+

@bors
Copy link
Contributor

bors commented Sep 26, 2016

📌 Commit 77958d5 has been approved by nrc

@bluss bluss added the relnotes Marks issues that should be documented in the release notes of the next release. label Sep 26, 2016
@bors
Copy link
Contributor

bors commented Sep 26, 2016

⌛ Testing commit 77958d5 with merge b786976...

bors added a commit that referenced this pull request Sep 26, 2016
…r=nrc

Forbid user-defined macros named "macro_rules"

This is a [breaking-change].
r? @nrc
@bors bors merged commit 77958d5 into rust-lang:master Sep 26, 2016
@jseyfried jseyfried deleted the make_macro_rules_invocations_magic branch September 27, 2016 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants