-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Simplify gated cfg checking #34272
Simplify gated cfg checking #34272
Conversation
// these need to be set "early" so that expansion sees `quote` if enabled. | ||
*sess.features.borrow_mut() = features; | ||
krate | ||
}); |
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.
Do we need to stop compilation if there were errors here?
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.
I don't see any reason to stop compilation -- the only errors that get reported here are malformed cfg
attributes (in which case the item is kept), malformed cfg_attr
attributes (in which case the attribute is removed), and malformed feature
attributes (in which case we might not see the features).
At worst, the user might see some gated feature errors for a feature they intended to use.
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.
(also, gated cfg errors are reported, which definitely don't require us to stop compilation)
@bors: r+ |
📌 Commit 80292a8 has been approved by |
☔ The latest upstream changes (presumably #34216) made this pull request unmergeable. Please resolve the merge conflicts. |
80292a8
to
64be754
Compare
📌 Commit 64be754 has been approved by |
64be754
to
92a9405
Compare
📌 Commit 92a9405 has been approved by |
92a9405
to
2cd6ccf
Compare
@bors r=nrc |
📌 Commit 2cd6ccf has been approved by |
Simplify gated cfg checking r? @nrc
Avoid processing `feature`s on unconfigured crates Fixes rust-lang#34932, a regression caused by rust-lang#34272. r? @nrc
r? @nrc