-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Pass features along during expansion #22383
Pass features along during expansion #22383
Conversation
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -590,11 +609,18 @@ fn check_crate_inner<F>(cm: &CodeMap, span_handler: &SpanHandler, krate: &ast::C | |||
|
|||
check(&mut cx, krate); | |||
|
|||
// FIXME (pnkfelix): Before adding the 99th entry below, change it | |||
// to a single-pass (instead of N calls to `.has_feature`)a. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/a//
ah good old tidy; that's what I get for introducing line breaks. |
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).
a252539
to
dc0797c
Compare
⌛ Testing commit dc0797c with merge a108a0a... |
💔 Test failed - auto-win-64-opt |
@bors: retry |
…-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. Fix rust-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]
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]