fix: emit error when fragment is MethodReceiverExpr and items is empty
This commit is contained in:
@@ -722,7 +722,11 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
|
||||
});
|
||||
}
|
||||
};
|
||||
if fragment_kind == AstFragmentKind::Expr && items.is_empty() {
|
||||
if matches!(
|
||||
fragment_kind,
|
||||
AstFragmentKind::Expr | AstFragmentKind::MethodReceiverExpr
|
||||
) && items.is_empty()
|
||||
{
|
||||
self.cx.emit_err(RemoveExprNotSupported { span });
|
||||
fragment_kind.dummy(span)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user