diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-13 15:18:38 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-13 15:18:38 +0000 |
commit | bcf2169e7d7c46276214cac627a70673b7676567 (patch) | |
tree | f81c7438f67de3c292a233887e56c7e99bcc0a01 /crates/hir_ty/src/diagnostics/unsafe_check.rs | |
parent | 7accf6bc37c059a83a58c82f463f02a02ed2226f (diff) | |
parent | 6c32bbf3ca5980fb33c1ea28dd1c5a1524ce81cb (diff) |
Merge #7996
7996: Separate `Ty` and `TyKind` like in Chalk r=flodiebold a=flodiebold
Currently `Ty` just wraps `TyKind`, but this allows us to change most
places to already use `intern` / `interned`.
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/diagnostics/unsafe_check.rs')
-rw-r--r-- | crates/hir_ty/src/diagnostics/unsafe_check.rs | 4 |
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 | }; |
12 | use hir_expand::diagnostics::DiagnosticSink; | 12 | use hir_expand::diagnostics::DiagnosticSink; |
13 | 13 | ||
14 | use crate::{db::HirDatabase, diagnostics::MissingUnsafe, InferenceResult, Ty}; | 14 | use crate::{db::HirDatabase, diagnostics::MissingUnsafe, InferenceResult, Interner, TyKind}; |
15 | 15 | ||
16 | pub(super) struct UnsafeValidator<'a, 'b: 'a> { | 16 | pub(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 | } |