rust/compiler/rustc_resolve/src
bors 889701db1f Auto merge of #129183 - estebank:cfg-visitor, r=davidtwco
Detect more `cfg`d out items in resolution errors

Use a visitor to collect *all* items (including those nested) that were stripped behind a `cfg` condition.

```
error[E0425]: cannot find function `f` in this scope
  --> $DIR/nested-cfg-attrs.rs:4:13
   |
LL | fn main() { f() }
   |             ^ not found in this scope
   |
note: found an item that was configured out
  --> $DIR/nested-cfg-attrs.rs:2:4
   |
LL | fn f() {}
   |    ^
note: the item is gated here
  --> $DIR/nested-cfg-attrs.rs:1:35
   |
LL | #[cfg_attr(all(), cfg_attr(all(), cfg(FALSE)))]
   |                                   ^^^^^^^^^^
```
2025-08-02 05:09:31 +00:00
..
late Detect more cfgd out items in resolution errors 2025-08-01 21:50:36 +00: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 remove rustc_attr_data_structures 2025-07-31 14:19:27 +02:00
check_unused.rs resolve: Minimize borrow scopes for resolutions 2025-07-26 00:19:12 +03: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 Auto merge of #129183 - estebank:cfg-visitor, r=davidtwco 2025-08-02 05:09:31 +00:00
effective_visibilities.rs resolve: Minimize borrow scopes for resolutions 2025-07-26 00:19:12 +03:00
errors.rs Tweak rendering of cfg'd out item 2025-08-01 23:58:15 +00:00
ident.rs resolve: Do not create NameResolutions on access unless necessary 2025-07-26 00:25:26 +03:00
imports.rs split up define into define_extern and define_local 2025-07-27 12:17:23 +02:00
late.rs Detect more cfgd out items in resolution errors 2025-08-01 21:50:36 +00:00
lib.rs remove rustc_attr_data_structures 2025-07-31 14:19:27 +02:00
macros.rs remove rustc_attr_data_structures 2025-07-31 14:19:27 +02:00
rustdoc.rs rustc_resolve: get rid of unused rustdoc::span_of_fragments_with_expansion 2025-07-22 18:36:09 -05:00