rust/compiler/rustc_query_system/src
Jacob Pratt 3a8621d681
Rollup merge of #138844 - petrochenkov:cfgtrace2, r=nnethercote
expand: Leave traces when expanding `cfg` attributes

This is the same as https://github.com/rust-lang/rust/pull/138515, but for `cfg(true)` instead of `cfg_attr`.

The difference is that `cfg(true)`s already left "traces" after themselves - the `cfg` attributes themselves, with `expanded_inert_attrs` set to true, with full tokens, available to proc macros.
This is not a reasonably expected behavior, but it could not be removed without a replacement, because a [major rustdoc feature](https://github.com/rust-lang/rfcs/pull/3631) and a number of clippy lints rely on it. This PR implements a replacement.

This needs a crater run, because it changes observable behavior (in an intended way) - proc macros can no longer see expanded `cfg(true)` attributes.

(Some minor unnecessary special casing for `sym::cfg_attr` is also removed in this PR.)

r? `@nnethercote`
2025-03-27 13:11:17 -04:00
..
dep_graph Remove prev_index_to_index field from CurrentDepGraph 2025-03-24 19:58:34 +01:00
ich expand: Leave traces when expanding cfg attributes 2025-03-26 15:30:12 +03:00
query Use a function to create QueryStackDeferred to ensure context is Copy 2025-03-26 13:09:36 +01:00
cache.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
error.rs don't return an Option from try_find_dep_kind 2025-01-07 21:57:00 +01:00
lib.rs Use hashbrown from crates.io 2025-03-21 07:54:35 +01:00
values.rs Value recovery can take the whole CycleError 2024-01-08 20:30:10 +00:00