Parse a pattern with no arm

This commit is contained in:
Nadrieril 2023-11-27 03:15:56 +01:00
parent caa488b96e
commit 80bdcbf50a
36 changed files with 420 additions and 279 deletions

View file

@ -505,7 +505,7 @@ impl<'a> ExtCtxt<'a> {
attrs: AttrVec::new(),
pat,
guard: None,
body: expr,
body: Some(expr),
span,
id: ast::DUMMY_NODE_ID,
is_placeholder: false,

View file

@ -119,7 +119,7 @@ pub fn placeholder(
}]),
AstFragmentKind::Arms => AstFragment::Arms(smallvec![ast::Arm {
attrs: Default::default(),
body: expr_placeholder(),
body: Some(expr_placeholder()),
guard: None,
id,
pat: pat(),