rust/compiler/rustc_resolve/src
Matthias Krüger 52868368dd
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 https://github.com/rust-lang/rust/issues/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``
2025-07-17 10:41:49 +02:00
..
late resolve: Change &mut Resolver to &Resolver when possible 2025-07-17 02:09:01 +03:00
rustdoc Update tests to work with new DocFragment field and redundant_explicit_links new API 2025-06-23 16:02:34 +02:00
build_reduced_graph.rs resolve: Change &mut Resolver to &Resolver when possible 2025-07-17 02:09:01 +03:00
check_unused.rs replace binding and shadowed_glob on NameResolution with non_glob_binding and glob_binding 2025-07-12 15:06:32 +02:00
def_collector.rs Fix ice for feature-gated cfg attributes applied to the crate 2025-07-15 23:28:15 +02:00
diagnostics.rs Rollup merge of #143550 - petrochenkov:lessmutres, r=lcnr 2025-07-17 10:41:44 +02:00
effective_visibilities.rs resolve: Change &mut Resolver to &Resolver when possible 2025-07-17 02:09:01 +03:00
errors.rs Rollup merge of #134006 - klensy:typos, r=nnethercote 2025-07-03 13:29:35 +02:00
ident.rs resolve: Change &mut Resolver to &Resolver when possible 2025-07-17 02:09:01 +03:00
imports.rs Rollup merge of #143550 - petrochenkov:lessmutres, r=lcnr 2025-07-17 10:41:44 +02:00
late.rs resolve: Change &mut Resolver to &Resolver when possible 2025-07-17 02:09:01 +03:00
lib.rs Rollup merge of #143550 - petrochenkov:lessmutres, r=lcnr 2025-07-17 10:41:44 +02:00
macros.rs resolve: Change &mut Resolver to &Resolver when possible 2025-07-17 02:09:01 +03:00
rustdoc.rs Improve path segment joining. 2025-07-17 08:37:19 +10:00