From 50e01d2bc7429d718e0783d75458a6a047ee2b70 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 1 Mar 2021 21:57:39 +0100 Subject: Use chalk_ir::AdtId --- crates/hir_ty/src/diagnostics/match_check.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/hir_ty/src/diagnostics/match_check.rs') diff --git a/crates/hir_ty/src/diagnostics/match_check.rs b/crates/hir_ty/src/diagnostics/match_check.rs index 86fee0050..04d39c571 100644 --- a/crates/hir_ty/src/diagnostics/match_check.rs +++ b/crates/hir_ty/src/diagnostics/match_check.rs @@ -222,12 +222,12 @@ use hir_def::{ adt::VariantData, body::Body, expr::{Expr, Literal, Pat, PatId}, - AdtId, EnumVariantId, StructId, VariantId, + EnumVariantId, StructId, VariantId, }; use la_arena::Idx; use smallvec::{smallvec, SmallVec}; -use crate::{db::HirDatabase, InferenceResult, Ty}; +use crate::{db::HirDatabase, AdtId, InferenceResult, Ty}; #[derive(Debug, Clone, Copy)] /// Either a pattern from the source code being analyzed, represented as @@ -627,7 +627,7 @@ pub(super) fn is_useful( // - `!` type // In those cases, no match arm is useful. match cx.infer[cx.match_expr].strip_references() { - Ty::Adt(AdtId::EnumId(enum_id), ..) => { + Ty::Adt(AdtId(hir_def::AdtId::EnumId(enum_id)), ..) => { if cx.db.enum_data(*enum_id).variants.is_empty() { return Ok(Usefulness::NotUseful); } -- cgit v1.2.3