Files
rust/tests/ui/proc-macro
Jonathan Brouwer ecee9438f1 Rollup merge of #159529 - UditDewan:nested-replacement-ranges-test, r=nnethercote
Add regression test for nested replacement ranges in `collect_tokens`

rust-lang/rust#129346 removed support for nested replacement ranges in `collect_tokens`, and simplified the nesting out of `tests/ui/proc-macro/macro-rules-derive-cfg.rs` accordingly. That removal turned out to break real-world code, so it was reverted in rust-lang/rust#132587 — but the revert only restored the compiler code, not the original nested shape of the test, leaving the nested case uncovered ever since.

This reinstates the nested case as a separate test: the pre-rust-lang/rust#129346 shape of `macro-rules-derive-cfg.rs` (a `cfg_attr` expansion nested inside a `let` statement, nested inside an anonymous constant), combined with the extra inner attributes that rust-lang/rust#129346 added to the simplified version. If nested replacement range support regresses again, this test fails.

The expected stdout was verified against current nightly; the sibling test's checked-in stdout reproduces byte-for-byte under the same setup.

Closes rust-lang/rust#132727
2026-07-20 18:06:11 +02:00
..
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-12-10 23:41:19 +00:00
2025-12-10 23:41:19 +00:00
2025-11-27 11:19:00 -05:00
2025-10-01 13:31:42 +08:00
2025-11-27 11:19:00 -05:00
…
2025-07-26 20:26:15 +02:00
2025-11-27 14:13:58 -05:00
2025-12-02 18:25:13 +00:00
2026-07-13 10:54:53 +02:00
2026-07-13 11:02:01 +02:00
2026-07-13 11:02:01 +02:00
2025-09-21 13:12:18 -04:00
2025-09-21 13:12:18 -04:00
…
…