We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8437f7 commit 375a0ffCopy full SHA for 375a0ff
crates/hir_expand/src/builtin_macro.rs
@@ -184,15 +184,16 @@ fn assert_expand(
184
let args = parse_exprs_with_sep(tt, ',');
185
let expanded = match &*args {
186
[cond, panic_args @ ..] => {
187
- let cond = cond.clone();
188
- let panic_args = panic_args.iter().cloned().intersperse(tt::Subtree {
+ let comma = tt::Subtree {
189
delimiter: None,
190
token_trees: vec![tt::TokenTree::Leaf(tt::Leaf::Punct(tt::Punct {
191
char: ',',
192
spacing: tt::Spacing::Alone,
193
id: tt::TokenId::unspecified(),
194
}))],
195
- });
+ };
+ let cond = cond.clone();
196
+ let panic_args = itertools::Itertools::intersperse(panic_args.iter().cloned(), comma);
197
quote! {{
198
if !#cond {
199
#krate::panic!(##panic_args);
0 commit comments