rust/tests
bors 78948ac259 Auto merge of #138515 - petrochenkov:cfgtrace, r=nnethercote
expand: Leave traces when expanding `cfg_attr` attributes

Currently `cfg_trace` just disappears during expansion, but after this PR `#[cfg_attr(some tokens)]` will leave a `#[cfg_attr_trace(some tokens)]` attribute instead of itself in AST after expansion (the new attribute is built-in and inert, its inner tokens are the same as in the original attribute).
This trace attribute can then be used by lints or other diagnostics, #133823 has some examples.

Tokens in these trace attributes are set to an empty token stream, so the traces are non-existent for proc macros and cannot affect any user-observable behavior.
This is also a weakness, because if a proc macro processes some code with the trace attributes, they will be lost, so the traces are best effort rather than precise.

The next step is to do the same thing with `cfg` attributes (`#[cfg(TRUE)]` currently remains in both AST and tokens after expanding, it should be replaced with a trace instead).

The idea belongs to `@estebank.`
2025-03-20 19:24:48 +00:00
..
assembly Rollup merge of #137816 - folkertdev:naked-asm-xcoff, r=Noratrieb 2025-03-13 11:28:20 +01:00
auxiliary tests: use minicore more 2025-02-24 09:26:54 +00:00
codegen Auto merge of #127173 - bjorn3:mangle_rustc_std_internal_symbol, r=wesleywiser,jieyouxu 2025-03-17 22:16:22 +00:00
codegen-units
coverage
coverage-run-rustdoc
crashes Remove existing AFIDT implementation 2025-03-18 17:35:26 +00:00
debuginfo Rollup merge of #137967 - mustartt:fix-aix-test-hangs, r=workingjubilee 2025-03-11 13:30:50 +01:00
incremental remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
mir-opt coverage: Don't store a body span in FunctionCoverageInfo 2025-03-18 23:18:24 +11:00
pretty Fix HIR param pretty printing some more. 2025-03-14 09:45:41 +11:00
run-make Auto merge of #127173 - bjorn3:mangle_rustc_std_internal_symbol, r=wesleywiser,jieyouxu 2025-03-17 22:16:22 +00:00
rustdoc Add RTN support to rustdoc 2025-03-15 18:13:27 +00:00
rustdoc-gui Rollup merge of #137539 - GuillaumeGomez:copy-content-tests, r=notriddle 2025-02-25 13:07:34 +01:00
rustdoc-js
rustdoc-js-std
rustdoc-json Rollup merge of #138569 - aDotInTheVoid:reprdoc-json, r=GuillaumeGomez 2025-03-18 10:09:30 +01:00
rustdoc-ui Fix ICE: attempted to remap an already remapped filename 2025-03-16 23:37:09 +01:00
ui Auto merge of #138515 - petrochenkov:cfgtrace, r=nnethercote 2025-03-20 19:24:48 +00:00
ui-fulldeps Make opts.maybe_sysroot non-optional 2025-03-12 15:05:24 +00:00
COMPILER_TESTS.md