mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Allow macros to expand to or-patterns
This commit is contained in:
parent
9700addc82
commit
8a7f0d920e
4 changed files with 33 additions and 7 deletions
|
@ -1266,17 +1266,14 @@ impl DefWithBody {
|
|||
if let ast::Expr::MatchExpr(match_expr) =
|
||||
&source_ptr.value.to_node(&root)
|
||||
{
|
||||
if let (Some(match_expr), Some(arms)) =
|
||||
(match_expr.expr(), match_expr.match_arm_list())
|
||||
{
|
||||
if let Some(match_expr) = match_expr.expr() {
|
||||
acc.push(
|
||||
MissingMatchArms {
|
||||
file: source_ptr.file_id,
|
||||
match_expr: AstPtr::new(&match_expr),
|
||||
arms: AstPtr::new(&arms),
|
||||
}
|
||||
.into(),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue