mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
internal: refactor remove this semicolon diagnostics
This commit is contained in:
parent
8d391ec981
commit
74f3cca85a
8 changed files with 71 additions and 83 deletions
|
@ -1184,10 +1184,7 @@ impl Function {
|
|||
}
|
||||
BodyValidationDiagnostic::RemoveThisSemicolon { expr } => {
|
||||
match source_map.expr_syntax(expr) {
|
||||
Ok(source_ptr) => sink.push(RemoveThisSemicolon {
|
||||
file: source_ptr.file_id,
|
||||
expr: source_ptr.value,
|
||||
}),
|
||||
Ok(expr) => acc.push(RemoveThisSemicolon { expr }.into()),
|
||||
Err(SyntheticSyntax) => (),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue