mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Add test for passing on ref expectations
This commit is contained in:
parent
3daca3eb4d
commit
13cb4a1b37
3 changed files with 15 additions and 8 deletions
|
@ -615,10 +615,10 @@ impl ExprCollector {
|
|||
.map(|arm| MatchArm {
|
||||
pats: arm.pats().map(|p| self.collect_pat(p)).collect(),
|
||||
expr: self.collect_expr_opt(arm.expr()),
|
||||
guard: arm.guard().map(|guard| {
|
||||
let e = guard.expr().expect("every guard should have an expr");
|
||||
self.collect_expr(e)
|
||||
}),
|
||||
guard: arm
|
||||
.guard()
|
||||
.and_then(|guard| guard.expr())
|
||||
.map(|e| self.collect_expr(e)),
|
||||
})
|
||||
.collect()
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue