diff --git a/Cargo.lock b/Cargo.lock index e3922c25bc90..c7cf4479b330 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -483,7 +483,6 @@ dependencies = [ "arrayvec", "base-db", "cfg", - "chalk-ir", "either", "hir-def", "hir-expand", diff --git a/crates/hir-ty/src/infer.rs b/crates/hir-ty/src/infer.rs index b69e51e2ee87..c0b3f4afb46e 100644 --- a/crates/hir-ty/src/infer.rs +++ b/crates/hir-ty/src/infer.rs @@ -1673,7 +1673,7 @@ impl std::ops::BitOrAssign for Diverges { /// /// E.g. when F is `|ty| matches!(ty.kind(Interer), TyKind::Unknown)`, the zipper /// will skip over all mismatches that only differ in `{unknown}`. -pub struct UnknownMismatch<'db, F: Fn(&Ty) -> bool>(pub &'db dyn HirDatabase, pub F); +struct UnknownMismatch<'db, F: Fn(&Ty) -> bool>(&'db dyn HirDatabase, F); impl bool> chalk_ir::zip::Zipper for UnknownMismatch<'_, F> { fn zip_tys(&mut self, variance: Variance, a: &Ty, b: &Ty) -> chalk_ir::Fallible<()> { let zip_substs = |this: &mut Self, diff --git a/crates/hir-ty/src/lib.rs b/crates/hir-ty/src/lib.rs index 7d9832d5eeb4..ba64f5c8d7ea 100644 --- a/crates/hir-ty/src/lib.rs +++ b/crates/hir-ty/src/lib.rs @@ -81,7 +81,7 @@ pub use chalk_ext::*; pub use infer::{ closure::{CaptureKind, CapturedItem}, could_coerce, could_unify, could_unify_deeply, Adjust, Adjustment, AutoBorrow, BindingMode, - InferenceDiagnostic, InferenceResult, OverloadedDeref, PointerCast, UnknownMismatch, + InferenceDiagnostic, InferenceResult, OverloadedDeref, PointerCast, }; pub use interner::Interner; pub use lower::{ diff --git a/crates/hir/Cargo.toml b/crates/hir/Cargo.toml index 486f28be2149..190722075a20 100644 --- a/crates/hir/Cargo.toml +++ b/crates/hir/Cargo.toml @@ -20,7 +20,6 @@ smallvec.workspace = true tracing.workspace = true triomphe.workspace = true once_cell = "1.17.1" -chalk-ir.workspace = true # local deps base-db.workspace = true diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 8400eb031992..dd19353c242d 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -39,7 +39,6 @@ use std::{iter, mem::discriminant, ops::ControlFlow}; use arrayvec::ArrayVec; use base_db::{CrateDisplayName, CrateId, CrateOrigin, FileId}; -use chalk_ir::TyKind; use either::Either; use hir_def::{ body::{BodyDiagnostic, SyntheticSyntax}, @@ -62,19 +61,7 @@ use hir_def::{ }; use hir_expand::{attrs::collect_attrs, name::name, proc_macro::ProcMacroKind, MacroCallKind}; use hir_ty::{ - all_super_traits, autoderef, check_orphan_rules, - consteval::{try_const_usize, unknown_const_as_generic, ConstExt}, - db::InternedClosure, - diagnostics::BodyValidationDiagnostic, - error_lifetime, known_const_to_ast, - layout::{Layout as TyLayout, RustcEnumVariantIdx, RustcFieldIdx, TagEncoding}, - method_resolution::{self, TyFingerprint}, - mir::{interpret_mir, MutBorrowKind}, - primitive::UintTy, - traits::FnTrait, - AliasTy, CallableDefId, CallableSig, Canonical, CanonicalVarKinds, Cast, ClosureId, GenericArg, - GenericArgData, Interner, ParamKind, QuantifiedWhereClause, Scalar, Substitution, - TraitEnvironment, TraitRefExt, Ty, TyBuilder, TyDefId, TyExt, ValueTyDefId, WhereClause, + all_super_traits, autoderef, check_orphan_rules, consteval::{try_const_usize, unknown_const_as_generic, ConstExt}, db::InternedClosure, diagnostics::BodyValidationDiagnostic, error_lifetime, known_const_to_ast, layout::{Layout as TyLayout, RustcEnumVariantIdx, RustcFieldIdx, TagEncoding}, method_resolution::{self, TyFingerprint}, mir::{interpret_mir, MutBorrowKind}, primitive::UintTy, traits::FnTrait, AliasTy, CallableDefId, CallableSig, Canonical, CanonicalVarKinds, Cast, ClosureId, GenericArg, GenericArgData, Interner, ParamKind, QuantifiedWhereClause, Scalar, Substitution, TraitEnvironment, TraitRefExt, Ty, TyBuilder, TyDefId, TyExt, TyKind, ValueTyDefId, WhereClause }; use itertools::Itertools; use nameres::diagnostics::DefDiagnosticKind;