mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
internal: refactor missing unsafe diagnostic
This commit is contained in:
parent
886b66cd03
commit
bccf77f26c
4 changed files with 106 additions and 107 deletions
|
@ -1090,9 +1090,7 @@ impl Function {
|
|||
|
||||
for expr in hir_ty::diagnostics::missing_unsafe(db, self.id.into()) {
|
||||
match source_map.expr_syntax(expr) {
|
||||
Ok(in_file) => {
|
||||
sink.push(MissingUnsafe { file: in_file.file_id, expr: in_file.value })
|
||||
}
|
||||
Ok(expr) => acc.push(MissingUnsafe { expr }.into()),
|
||||
Err(SyntheticSyntax) => {
|
||||
// FIXME: Here and eslwhere in this file, the `expr` was
|
||||
// desugared, report or assert that this doesn't happen.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue