mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Wrap inner tail expressions in MissingOkOrSomeInTailExpr
This commit is contained in:
parent
eb513c22f7
commit
1edbaa29f9
8 changed files with 69 additions and 11 deletions
|
@ -1216,7 +1216,14 @@ impl Function {
|
|||
}
|
||||
BodyValidationDiagnostic::MissingOkOrSomeInTailExpr { expr, required } => {
|
||||
match source_map.expr_syntax(expr) {
|
||||
Ok(expr) => acc.push(MissingOkOrSomeInTailExpr { expr, required }.into()),
|
||||
Ok(expr) => acc.push(
|
||||
MissingOkOrSomeInTailExpr {
|
||||
expr,
|
||||
required,
|
||||
expected: self.ret_type(db),
|
||||
}
|
||||
.into(),
|
||||
),
|
||||
Err(SyntheticSyntax) => (),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue