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
..
2026-07-20 18:06:01 +02:00
2026-06-09 15:39:26 +02:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2026-06-02 21:12:15 +02:00
2026-06-02 21:12:22 +02:00
2026-02-17 16:51:44 +00:00
2026-03-09 09:00:58 +00:00
2026-03-09 09:00:58 +00:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-08-11 17:02:32 +00:00
2026-05-29 21:21:45 +02:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2026-06-13 12:44:34 +02:00
2026-06-13 12:44:34 +02:00
2026-06-09 15:39:26 +02:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2026-07-20 14:42:35 +10:00
2026-07-20 14:42:35 +10:00
2025-12-10 23:41:19 +00:00
2026-04-09 18:53:59 +02:00
2025-12-10 23:41:19 +00:00
2026-04-30 14:19:21 +08:00
2025-09-26 15:33:48 +02:00
2025-06-03 13:35:31 +02:00
2025-12-10 23:41:19 +00:00
2025-12-10 23:41:19 +00:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-12-10 23:41:19 +00:00
2025-06-12 21:28:49 +00:00
2025-08-14 15:28:35 +02:00
2025-08-14 15:28:35 +02:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2026-01-22 19:50:00 +01:00
2026-01-22 19:50:00 +01:00
2025-09-26 15:33:48 +02:00
2025-06-12 21:28:49 +00:00
2026-01-27 18:11:52 +03:00
2026-01-27 18:11:52 +03:00
2026-05-13 15:52:33 +10:00
2025-09-26 15:33:48 +02:00
2025-12-02 18:25:13 +00:00
2025-09-26 15:33:48 +02:00
2025-10-01 13:31:42 +08:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-12-09 17:29:23 +00:00
2025-09-26 15:33:48 +02:00
2025-11-27 11:19:00 -05:00
2026-01-27 18:11:52 +03:00
2025-08-05 15:28:49 +03:00
2025-08-19 21:27:10 +02:00
2025-06-03 13:35:31 +02:00
2025-11-24 10:52:03 -08:00
2025-09-26 15:33:48 +02:00
2026-04-19 15:46:52 +05:30
2026-04-19 15:46:52 +05:30
2026-03-07 21:02:10 +00:00
2025-08-14 18:18:42 +02:00
2025-08-14 18:18:42 +02:00
2026-06-08 21:02:36 +02:00
2026-07-18 09:04:06 -03:00
2026-07-18 09:04:06 -03:00
2026-07-18 09:04:06 -03:00
2026-07-18 09:04:06 -03:00
2026-07-18 09:04:06 -03:00
2025-07-26 20:26:15 +02:00
2026-04-15 01:38:14 +00:00
2026-02-11 20:09:30 +00:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-06-03 13:35:31 +02:00
2025-06-03 13:35:31 +02:00
2025-06-03 13:35:31 +02:00
2025-09-26 15:33:48 +02:00
2025-08-05 15:28:49 +03:00
2025-08-05 15:28:49 +03:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-11-27 14:13:58 -05:00
2025-12-02 18:25:13 +00:00
2026-03-22 07:51:23 +00:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2026-02-01 18:20:30 +00:00
2026-07-15 12:08:14 +00:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-12-09 17:29:23 +00:00
2025-08-06 23:59:47 +00:00
2025-08-06 23:59:47 +00:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2026-03-14 20:13:43 +00:00
2025-11-27 11:19:00 -05:00
2025-08-12 09:24:45 -07:00
2026-07-18 12:41:34 -04:00
2026-07-18 12:41:34 -04:00
2025-12-02 18:25:13 +00:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2026-07-13 10:54:53 +02:00
2026-07-13 11:02:01 +02:00
2026-04-08 12:37:25 +02:00
2026-06-08 21:02:36 +02:00
2025-09-26 15:33:48 +02:00
2026-06-13 12:44:34 +02:00
2026-06-13 12:44:34 +02:00
2025-12-30 17:59:40 +08:00
2026-01-27 18:11:52 +03:00
2025-11-16 23:14:51 +01:00
2026-06-27 19:32:49 -04:00
2026-06-27 19:32:49 -04:00
2026-07-13 10:54:53 +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
2025-09-26 15:33:48 +02:00
2025-12-09 17:29:23 +00:00
2026-01-19 12:27:27 +11:00
2025-08-05 15:28:49 +03:00
2025-08-19 21:27:10 +02:00
2026-06-09 15:27:04 +02:00
2026-06-09 15:39:26 +02:00
2025-12-09 17:29:23 +00:00
2026-01-19 12:27:27 +11:00
2026-01-19 12:27:27 +11:00
2026-01-19 12:27:27 +11:00
2026-01-19 12:27:27 +11:00
2026-07-13 10:54:53 +02:00
2025-09-26 15:33:48 +02:00
2025-09-26 15:33:48 +02:00
2025-12-02 18:25:13 +00:00
2025-12-11 18:15:15 +00:00
2025-12-11 18:15:15 +00:00
2026-07-14 17:01:45 +08:00
2026-06-07 00:38:06 +02:00
2026-06-13 12:44:34 +02:00
2025-09-26 15:33:48 +02:00
2025-11-07 08:27:23 +08:00