mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
internal: refactor BreakOutsideOfLoop diagnostic
This commit is contained in:
parent
7166e8549b
commit
886b66cd03
4 changed files with 36 additions and 32 deletions
|
@ -1080,10 +1080,10 @@ impl Function {
|
|||
acc.push(NoSuchField { field }.into())
|
||||
}
|
||||
hir_ty::InferenceDiagnostic::BreakOutsideOfLoop { expr } => {
|
||||
let ptr = source_map
|
||||
let expr = source_map
|
||||
.expr_syntax(*expr)
|
||||
.expect("break outside of loop in synthetic syntax");
|
||||
sink.push(BreakOutsideOfLoop { file: ptr.file_id, expr: ptr.value })
|
||||
acc.push(BreakOutsideOfLoop { expr }.into())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue