diff options
author | Aleksey Kladov <[email protected]> | 2021-06-13 18:00:27 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-06-13 18:01:01 +0100 |
commit | bccf77f26cd504de14f7d7d03f9f2a85d0fabb3d (patch) | |
tree | 2d38ea6fb04b05a44467bd9614253b8621848f20 /crates/hir/src/lib.rs | |
parent | 886b66cd03cbe7cb13e248d7c7bbdeba66c7796a (diff) |
internal: refactor missing unsafe diagnostic
Diffstat (limited to 'crates/hir/src/lib.rs')
-rw-r--r-- | crates/hir/src/lib.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 2f507b83b..16f862707 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs | |||
@@ -1090,9 +1090,7 @@ impl Function { | |||
1090 | 1090 | ||
1091 | for expr in hir_ty::diagnostics::missing_unsafe(db, self.id.into()) { | 1091 | for expr in hir_ty::diagnostics::missing_unsafe(db, self.id.into()) { |
1092 | match source_map.expr_syntax(expr) { | 1092 | match source_map.expr_syntax(expr) { |
1093 | Ok(in_file) => { | 1093 | Ok(expr) => acc.push(MissingUnsafe { expr }.into()), |
1094 | sink.push(MissingUnsafe { file: in_file.file_id, expr: in_file.value }) | ||
1095 | } | ||
1096 | Err(SyntheticSyntax) => { | 1094 | Err(SyntheticSyntax) => { |
1097 | // FIXME: Here and eslwhere in this file, the `expr` was | 1095 | // FIXME: Here and eslwhere in this file, the `expr` was |
1098 | // desugared, report or assert that this doesn't happen. | 1096 | // desugared, report or assert that this doesn't happen. |