Avoid producing NoDelim values in MacArgs::delim().

This commit is contained in:
Nicholas Nethercote 2022-04-26 15:21:15 +10:00
parent 10954cfd4c
commit e08df2dd6b

View File

@ -1325,7 +1325,7 @@ pub(crate) fn can_be_overflowed_expr(
}
ast::ExprKind::MacCall(ref mac) => {
match (
rustc_ast::ast::MacDelimiter::from_token(mac.args.delim()),
rustc_ast::ast::MacDelimiter::from_token(mac.args.delim().unwrap()),
context.config.overflow_delimited_expr(),
) {
(Some(ast::MacDelimiter::Bracket), true)