aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/diagnostics/unsafe_check.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-03-13 13:44:51 +0000
committerFlorian Diebold <[email protected]>2021-03-13 15:17:15 +0000
commit6c32bbf3ca5980fb33c1ea28dd1c5a1524ce81cb (patch)
treef81c7438f67de3c292a233887e56c7e99bcc0a01 /crates/hir_ty/src/diagnostics/unsafe_check.rs
parent7accf6bc37c059a83a58c82f463f02a02ed2226f (diff)
Separate `Ty` and `TyKind` like in Chalk
Currently `Ty` just wraps `TyKind`, but this allows us to change most places to already use `intern` / `interned`.
Diffstat (limited to 'crates/hir_ty/src/diagnostics/unsafe_check.rs')
-rw-r--r--crates/hir_ty/src/diagnostics/unsafe_check.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_ty/src/diagnostics/unsafe_check.rs b/crates/hir_ty/src/diagnostics/unsafe_check.rs
index e77a20fea..e095bee28 100644
--- a/crates/hir_ty/src/diagnostics/unsafe_check.rs
+++ b/crates/hir_ty/src/diagnostics/unsafe_check.rs
@@ -11,7 +11,7 @@ use hir_def::{
11}; 11};
12use hir_expand::diagnostics::DiagnosticSink; 12use hir_expand::diagnostics::DiagnosticSink;
13 13
14use crate::{db::HirDatabase, diagnostics::MissingUnsafe, InferenceResult, Ty}; 14use crate::{db::HirDatabase, diagnostics::MissingUnsafe, InferenceResult, Interner, TyKind};
15 15
16pub(super) struct UnsafeValidator<'a, 'b: 'a> { 16pub(super) struct UnsafeValidator<'a, 'b: 'a> {
17 owner: DefWithBodyId, 17 owner: DefWithBodyId,
@@ -110,7 +110,7 @@ fn walk_unsafe(
110 } 110 }
111 } 111 }
112 Expr::UnaryOp { expr, op: UnaryOp::Deref } => { 112 Expr::UnaryOp { expr, op: UnaryOp::Deref } => {
113 if let Ty::Raw(..) = &infer[*expr] { 113 if let TyKind::Raw(..) = &infer[*expr].interned(&Interner) {
114 unsafe_exprs.push(UnsafeExpr { expr: current, inside_unsafe_block }); 114 unsafe_exprs.push(UnsafeExpr { expr: current, inside_unsafe_block });
115 } 115 }
116 } 116 }