From c551604b5a0b74a43f5efe567bcbd979daa2f3cc Mon Sep 17 00:00:00 2001 From: Florian Diebold <flodiebold@gmail.com> Date: Sat, 3 Apr 2021 13:08:29 +0200 Subject: Rename Ty::interned to Ty::kind ... since that's the actual method on Chalk side that matches the signature. --- crates/hir_ty/src/diagnostics/expr.rs | 2 +- crates/hir_ty/src/diagnostics/match_check.rs | 2 +- crates/hir_ty/src/diagnostics/unsafe_check.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/hir_ty/src/diagnostics') diff --git a/crates/hir_ty/src/diagnostics/expr.rs b/crates/hir_ty/src/diagnostics/expr.rs index 373d1cb74..ad1259b34 100644 --- a/crates/hir_ty/src/diagnostics/expr.rs +++ b/crates/hir_ty/src/diagnostics/expr.rs @@ -378,7 +378,7 @@ impl<'a, 'b> ExprValidator<'a, 'b> { _ => return, }; - let (params, required) = match mismatch.expected.interned(&Interner) { + let (params, required) = match mismatch.expected.kind(&Interner) { TyKind::Adt(AdtId(hir_def::AdtId::EnumId(enum_id)), ref parameters) if *enum_id == core_result_enum => { diff --git a/crates/hir_ty/src/diagnostics/match_check.rs b/crates/hir_ty/src/diagnostics/match_check.rs index 85ba58c44..34291578a 100644 --- a/crates/hir_ty/src/diagnostics/match_check.rs +++ b/crates/hir_ty/src/diagnostics/match_check.rs @@ -626,7 +626,7 @@ pub(super) fn is_useful( // - enum with no variants // - `!` type // In those cases, no match arm is useful. - match cx.infer[cx.match_expr].strip_references().interned(&Interner) { + match cx.infer[cx.match_expr].strip_references().kind(&Interner) { TyKind::Adt(AdtId(hir_def::AdtId::EnumId(enum_id)), ..) => { if cx.db.enum_data(*enum_id).variants.is_empty() { return Ok(Usefulness::NotUseful); diff --git a/crates/hir_ty/src/diagnostics/unsafe_check.rs b/crates/hir_ty/src/diagnostics/unsafe_check.rs index 1f49a4909..a71eebc6f 100644 --- a/crates/hir_ty/src/diagnostics/unsafe_check.rs +++ b/crates/hir_ty/src/diagnostics/unsafe_check.rs @@ -110,7 +110,7 @@ fn walk_unsafe( } } Expr::UnaryOp { expr, op: UnaryOp::Deref } => { - if let TyKind::Raw(..) = &infer[*expr].interned(&Interner) { + if let TyKind::Raw(..) = &infer[*expr].kind(&Interner) { unsafe_exprs.push(UnsafeExpr { expr: current, inside_unsafe_block }); } } -- cgit v1.2.3