Dylan DPC
a3eb2f0f22
Rollup merge of #109664 - m-ou-se:format-args-placeholder-span, r=oli-obk
...
Use span of placeholders in format_args!() expansion.
`format_args!("{}", x)` expands to something that contains `Argument::new_display(&x)`. That entire expression was generated with the span of `x`.
After this PR, `&x` uses the span of `x`, but the `new_display` call uses the span of the `{}` placeholder within the format string. If an implicitly captured argument was used like in `format_args!("{x}")`, both use the span of the `{x}` placeholder.
This fixes https://github.com/rust-lang/rust/issues/109576 , and also allows for more improvements to similar diagnostics in the future, since the usage of `x` can now be traced to the exact `{}` placeholder that required it to be `Display` (or `Debug` etc.)
2023-03-29 14:07:28 +05:30
..
2023-03-03 05:02:34 +00:00
2023-02-14 20:22:10 +00:00
2023-02-22 08:40:47 -07:00
2023-03-16 04:02:56 +00:00
2023-03-16 04:02:56 +00:00
2023-03-14 16:39:45 +01:00
2023-03-14 16:39:45 +01:00
2023-02-28 07:55:19 +00:00
2023-02-28 07:55:19 +00:00
2023-03-06 16:37:34 +00:00
2023-03-06 16:37:34 +00:00
2023-03-08 15:37:14 +01:00
2023-02-22 08:40:47 -07:00
2023-02-13 16:23:23 +01:00
2023-02-13 16:23:23 +01:00
2023-02-21 05:21:07 +00:00
2023-03-03 08:39:36 +01:00
2023-02-13 16:23:23 +01:00
2023-02-21 05:21:07 +00:00
2023-02-23 10:27:06 -07:00
2023-02-23 10:27:06 -07:00
2023-02-23 10:27:06 -07:00
2023-03-27 14:56:59 +02:00
2023-02-23 10:27:06 -07:00
2023-02-23 10:27:06 -07:00
2023-02-23 10:27:06 -07:00
2023-02-23 10:27:06 -07:00
2023-02-09 02:38:55 +00:00
2023-02-09 02:38:55 +00:00
2023-02-09 02:38:55 +00:00
2023-03-05 16:08:06 +00:00
2023-03-05 16:08:06 +00:00
2023-03-24 19:52:34 +08:00
2023-03-24 19:52:34 +08:00
2023-03-24 19:52:34 +08:00
2023-03-21 01:23:28 +08:00
2023-03-21 01:23:28 +08:00
2023-03-22 13:52:24 +08:00
2023-03-22 13:52:24 +08:00
2023-02-13 16:23:23 +01:00
2023-02-13 16:23:23 +01:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:19 +00:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:19 +00:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:18 +00:00
2023-02-23 10:27:06 -07:00
2023-02-23 10:27:06 -07:00
2023-02-23 10:27:06 -07:00
2023-02-23 10:27:06 -07:00
2023-02-23 10:27:06 -07:00
2023-03-04 00:29:52 +00:00
2023-03-04 00:29:52 +00:00
2023-03-27 21:01:23 -04:00
2023-02-13 16:23:23 +01:00
2023-02-22 08:40:47 -07:00
2023-02-10 18:18:08 +00:00
2023-02-10 18:18:08 +00:00
2023-03-17 15:39:05 +00:00
2023-03-17 15:39:05 +00:00
2023-02-28 17:29:46 +00:00
2023-02-28 17:29:46 +00:00
2023-02-15 12:31:38 +00:00
2023-02-15 12:31:38 +00:00
2023-02-22 08:40:47 -07:00
2023-02-23 10:27:06 -07:00
2023-02-06 21:48:10 +00:00
2023-02-06 21:48:10 +00:00
2023-02-23 10:27:06 -07:00
2023-02-23 10:27:06 -07:00