mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
internal: refactor missing or or some diagnostic
This commit is contained in:
parent
74f3cca85a
commit
949a6ec469
5 changed files with 43 additions and 57 deletions
|
@ -1190,11 +1190,7 @@ impl Function {
|
|||
}
|
||||
BodyValidationDiagnostic::MissingOkOrSomeInTailExpr { expr, required } => {
|
||||
match source_map.expr_syntax(expr) {
|
||||
Ok(source_ptr) => sink.push(MissingOkOrSomeInTailExpr {
|
||||
file: source_ptr.file_id,
|
||||
expr: source_ptr.value,
|
||||
required,
|
||||
}),
|
||||
Ok(expr) => acc.push(MissingOkOrSomeInTailExpr { expr, required }.into()),
|
||||
Err(SyntheticSyntax) => (),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue