Skip to content

Pass features along during expansion - #22383

Merged
huonw merged 3 commits into
rust-lang:masterfrom
pnkfelix:pass-features-along-during-expansion
Feb 18, 2015
Merged

Pass features along during expansion#22383
huonw merged 3 commits into
rust-lang:masterfrom
pnkfelix:pass-features-along-during-expansion

Conversation

@pnkfelix

Copy link
Copy Markdown
Contributor

Pass features along during expansion

Use the set of passed features to detect uses of feature-gated macros without the corresponding feature enabled.

Fix#22234.


Also, the framework this add (passing along a reference to the features in the expansion context) is a necessary precursor for landing a properly feature-gated desugaring-based overloaded-box and placement-in (#22181).


This is fixing a bug, but since there might be code out there that is unknowingly taking advantage of that bug, I feel obligated to mark this as a:

[breaking-change]

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

Comment threadsrc/libsyntax/feature_gate.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/a//

@pnkfelix

Copy link
Copy Markdown
ContributorAuthor

ah good old tidy; that's what I get for introducing line breaks.

@huonw

Copy link
Copy Markdown
Contributor

r=me with the comment and maybe some squashing.

The other cases: `concat_idents!`, `log_syntax!`, and `trace_macros!`,
(these macros, with `asm!`, are handled (eagerly) in feature_gate.rs).
@pnkfelix
pnkfelixforce-pushed the pass-features-along-during-expansion branch from a252539 to dc0797cCompareFebruary 16, 2015 00:36
@pnkfelix

Copy link
Copy Markdown
ContributorAuthor

@bors r=huonw dc0797c

@bors

bors commented Feb 16, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit dc0797c with merge a108a0a...

@bors

bors commented Feb 16, 2015

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-win-64-opt

@alexcrichton

Copy link
Copy Markdown
Member

@bors: retry

Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 17, 2015
…-expansion, r=huonw
Pass features along during expansion
Use the set of passed features to detect uses of feature-gated macros without the corresponding feature enabled.
Fixrust-lang#22234.
----
Also, the framework this add (passing along a reference to the features in the expansion context) is a necessary precursor for landing a properly feature-gated desugaring-based overloaded-`box` and placement-`in` (rust-lang#22181).
----
This is fixing a bug, but since there might be code out there that is unknowingly taking advantage of that bug, I feel obligated to mark this as a:
[breaking-change]
@huonw
huonw merged commit dc0797c into rust-lang:masterFeb 18, 2015
lnicola pushed a commit to lnicola/rust that referenced this pull request Jun 1, 2026
…-builtin
fix: Have a specific error for unimplemented builtin macros
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature_gate::MacroVisitor misses macro invocations nested in macro invocations

5 participants

@pnkfelix@rust-highfive@huonw@bors@alexcrichton