-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
macros: clean up scopes of expanded #[macro_use]
imports
#37084
Merged
bors
merged 14 commits into
rust-lang:master
from
jseyfried:cleanup_expanded_macro_use_scopes
Oct 13, 2016
Merged
macros: clean up scopes of expanded #[macro_use]
imports
#37084
bors
merged 14 commits into
rust-lang:master
from
jseyfried:cleanup_expanded_macro_use_scopes
Oct 13, 2016
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@EddyD, @brson, @nikomatsakis could this get a Crater run please? |
Starting crater run now. |
Thanks @eddyb! |
@bors: r+ |
📌 Commit 829bd8c has been approved by |
ah crap @bors: r- |
r=me if the Crater run comes back clean |
The crater report only has crater download failures and such (cc @brson). @bors r=nrc |
📌 Commit 829bd8c has been approved by |
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this pull request
Oct 12, 2016
…e_scopes, r=nrc macros: clean up scopes of expanded `#[macro_use]` imports This PR changes the scope of macro-expanded `#[macro_use]` imports to match that of unexpanded `#[macro_use]` imports. For example, this would be allowed: ```rust example!(); macro_rules! m { () => { #[macro_use(example)] extern crate example_crate; } } m!(); ``` This PR also enforces the full shadowing restrictions from RFC 1560 on `#[macro_use]` imports (currently, we only enforce the weakened restrictions from rust-lang#36767). This is a [breaking-change], but I believe it is highly unlikely to cause breakage in practice. r? @nrc
bors
added a commit
that referenced
this pull request
Oct 12, 2016
bors
added a commit
that referenced
this pull request
Nov 7, 2016
macros: improve shadowing checks This PR improves macro-expanded shadowing checks to work with out-of-(pre)order expansion. Out-of-order expansion became possible in #37084, so this technically a [breaking-change] for nightly. The regression test from this PR is an example of code that would break. r? @nrc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR changes the scope of macro-expanded
#[macro_use]
imports to match that of unexpanded#[macro_use]
imports. For example, this would be allowed:This PR also enforces the full shadowing restrictions from RFC 1560 on
#[macro_use]
imports (currently, we only enforce the weakened restrictions from #36767).This is a [breaking-change], but I believe it is highly unlikely to cause breakage in practice.
r? @nrc