rust/tests
tdanniels e480739e56
Prevent ICE when formatting item-only vec!{} (#5879)
* Prevent ICE when formatting item-only `vec!{}`

Fixes 5735

Attempting to format invocations of macros which are considered "forced
bracket macros" (currently only `vec!`), but are invoked with braces
instead of brackets, and contain only items in their token trees,
currently triggers an ICE in rustfmt. This is because the function that
handles formatting macro invocations containing only items,
`rewrite_macro_with_items`, assumes that the forced delimiter style of
the macro being formatted is the same as the delimiter style in the
macro's source text when attempting to locate the span after the macro's
opening delimiter. This leads to the construction of an invalid span,
triggering the ICE.

The fix here is to pass the old delimiter style to
`rewrite_macro_with_items` as well, so that it can successfully locate
the span.
2023-08-17 15:21:53 -04:00
..
cargo-fmt Inline format arguments for easier reading (#5881) 2023-08-13 14:14:31 -05:00
config fix: handle skip_macro_invocations from config file 2023-07-05 17:46:03 -04:00
coverage
mod-resolver Merge commit '1d8491b120223272b13451fc81265aa64f7f4d5b' into sync-from-rustfmt 2023-01-24 14:16:03 -06:00
parser
rustfmt Inline format arguments for easier reading (#5881) 2023-08-13 14:14:31 -05:00
source Prevent ICE when formatting item-only vec!{} (#5879) 2023-08-17 15:21:53 -04:00
target Prevent ICE when formatting item-only vec!{} (#5879) 2023-08-17 15:21:53 -04:00
writemode Merge commit '5ff7b632a95bac6955611d85040859128902c580' into sync-rustfmt-subtree 2022-03-29 23:17:30 -05:00