-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Fix ice for feature-gated cfg
attributes applied to the crate
#143984
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
Conversation
|
Some changes occurred in compiler/rustc_attr_parsing |
This comment has been minimized.
This comment has been minimized.
1afb1ef
to
4c15fb9
Compare
4c15fb9
to
806d291
Compare
r? @Urgau if you wish, otherwise feel free to assign back to Jana |
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
806d291
to
bfa45ac
Compare
Thanks. r=me when PR CI is green @bors delegate+ |
✌️ @JonathanBrouwer, you can now approve this pull request! If @Urgau told you to " |
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
@bors rollup |
Rollup of 11 pull requests Successful merges: - #143326 (Remove deprecated `Error::description` impl from `c_str::FromBytesWithNulError`) - #143431 (Use relative visibility when noting sealed trait to reduce false positive) - #143550 (resolve: Use interior mutability for extern module map) - #143631 (update to literal-escaper-0.0.5) - #143793 (Opaque type collection: Guard against endlessly recursing free alias types) - #143880 (tests: Test line debuginfo for linebreaked function parameters) - #143914 (Reword mismatched-lifetime-syntaxes text based on feedback) - #143926 (Remove deprecated fields in bootstrap) - #143955 (Make frame spans appear on a separate trace line) - #143975 (type_id_eq: check that the hash fully matches the type) - #143984 (Fix ice for feature-gated `cfg` attributes applied to the crate) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #143984 - JonathanBrouwer:fix-feature-gate-ice, r=Urgau Fix ice for feature-gated `cfg` attributes applied to the crate This PR fixes two fixes: 1. When a feature gated option of the `cfg` attribute is applied to the crate, an ICE would occur because features are not yet available at that stage. This is fixed by ignoring the feature gate at that point, the attribute will later be re-checked (this was already done) when the feature gate is available. Fixes #143977 2. Errors and lints on the `cfg` attribute applied to the crate would be produced twice, because of the re-checking. This is fixed by not producing any errors and lints during the first run. The added regression test checks both problems. r? ``@jdonszelmann``
Rollup of 11 pull requests Successful merges: - rust-lang/rust#143326 (Remove deprecated `Error::description` impl from `c_str::FromBytesWithNulError`) - rust-lang/rust#143431 (Use relative visibility when noting sealed trait to reduce false positive) - rust-lang/rust#143550 (resolve: Use interior mutability for extern module map) - rust-lang/rust#143631 (update to literal-escaper-0.0.5) - rust-lang/rust#143793 (Opaque type collection: Guard against endlessly recursing free alias types) - rust-lang/rust#143880 (tests: Test line debuginfo for linebreaked function parameters) - rust-lang/rust#143914 (Reword mismatched-lifetime-syntaxes text based on feedback) - rust-lang/rust#143926 (Remove deprecated fields in bootstrap) - rust-lang/rust#143955 (Make frame spans appear on a separate trace line) - rust-lang/rust#143975 (type_id_eq: check that the hash fully matches the type) - rust-lang/rust#143984 (Fix ice for feature-gated `cfg` attributes applied to the crate) r? `@ghost` `@rustbot` modify labels: rollup
…ce, r=Urgau Fix ice for feature-gated `cfg` attributes applied to the crate This PR fixes two fixes: 1. When a feature gated option of the `cfg` attribute is applied to the crate, an ICE would occur because features are not yet available at that stage. This is fixed by ignoring the feature gate at that point, the attribute will later be re-checked (this was already done) when the feature gate is available. Fixes rust-lang#143977 2. Errors and lints on the `cfg` attribute applied to the crate would be produced twice, because of the re-checking. This is fixed by not producing any errors and lints during the first run. The added regression test checks both problems. r? ``@jdonszelmann``
…iaskrgr Rollup of 11 pull requests Successful merges: - rust-lang#143326 (Remove deprecated `Error::description` impl from `c_str::FromBytesWithNulError`) - rust-lang#143431 (Use relative visibility when noting sealed trait to reduce false positive) - rust-lang#143550 (resolve: Use interior mutability for extern module map) - rust-lang#143631 (update to literal-escaper-0.0.5) - rust-lang#143793 (Opaque type collection: Guard against endlessly recursing free alias types) - rust-lang#143880 (tests: Test line debuginfo for linebreaked function parameters) - rust-lang#143914 (Reword mismatched-lifetime-syntaxes text based on feedback) - rust-lang#143926 (Remove deprecated fields in bootstrap) - rust-lang#143955 (Make frame spans appear on a separate trace line) - rust-lang#143975 (type_id_eq: check that the hash fully matches the type) - rust-lang#143984 (Fix ice for feature-gated `cfg` attributes applied to the crate) r? `@ghost` `@rustbot` modify labels: rollup
This PR fixes two fixes:
cfg
attribute is applied to the crate, an ICE would occur because features are not yet available at that stage. This is fixed by ignoring the feature gate at that point, the attribute will later be re-checked (this was already done) when the feature gate is available. Fixes ICE:features not available at this point in the compiler
#143977cfg
attribute applied to the crate would be produced twice, because of the re-checking. This is fixed by not producing any errors and lints during the first run.The added regression test checks both problems.
r? @jdonszelmann