Files
rust/tests/ui/macros
Jacob Pratt 8075b89aa6 Rollup merge of #152508 - arferreira:improve-write-macro-diagnostic, r=Mark-Simulacrum
Improve write! and writeln! error when called without destination

Fixes rust-lang/rust#152493

Adds catch-all arms to `write!` and `writeln!` macros so that calling them without a destination (e.g., `write!("S")` instead of `write!(f, "S")`) gives a clear error instead of the cryptic "unexpected end of macro invocation" pointing at macro internals.

r? @estebank
2026-02-14 23:17:31 -05:00
..
2025-11-27 14:13:58 -05:00
2025-11-27 14:13:58 -05:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2024-10-28 14:20:28 +11:00
2024-10-28 14:20:28 +11:00
2025-02-21 15:49:44 +11:00
2025-11-27 14:13:58 -05:00
2025-12-06 10:22:13 +01:00
2025-12-06 10:22:13 +01:00
2023-01-11 09:32:08 +00:00
2024-02-29 19:06:31 +08:00
2025-08-09 16:27:20 +05:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2024-03-03 16:30:48 -03:00
2024-03-03 16:30:48 -03:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-04-20 15:06:17 -03:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2025-12-10 23:41:19 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2024-02-09 15:43:08 -03:00
2024-02-09 15:43:08 -03:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2025-08-14 18:18:42 +02:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2025-12-03 16:38:24 +01:00
2025-12-03 16:38:24 +01:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2025-04-03 21:41:58 +00:00
2025-11-27 14:13:58 -05:00
2025-11-27 14:13:58 -05:00
2025-11-27 14:13:58 -05:00
2025-08-09 16:27:20 +05:00
2025-02-21 15:49:46 +11:00
2025-02-21 15:49:46 +11:00
2023-01-11 09:32:08 +00:00
2024-10-28 14:20:28 +11:00
2024-10-28 14:20:28 +11: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
2025-03-07 14:51:07 +11:00
2025-07-23 13:33:23 +02:00
2025-07-23 13:33:23 +02:00
2025-11-27 11:19:00 -05:00
2024-10-28 14:20:28 +11:00
2024-10-28 14:20:28 +11:00
2025-11-27 14:13:58 -05:00
2025-11-27 14:13:58 -05:00
2025-11-27 11:19:00 -05:00
2025-11-27 14:13:58 -05:00
2025-11-27 14:13:58 -05:00
2025-12-10 15:15:56 +01:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2025-03-11 09:46:34 -07:00
2025-12-03 17:01:49 +01:00
2025-02-28 08:36:12 +11:00