WIP switch inference table to next-solver

This commit is contained in:
jackh726 2025-08-13 22:54:10 +00:00 committed by Shoyu Vanilla
parent 6da1ce7869
commit d24e8c1d38
17 changed files with 2292 additions and 526 deletions

View file

@ -14,7 +14,7 @@ use hir_expand::{
mod_path::{ModPath, PathKind},
name::Name,
};
use hir_ty::{db::HirDatabase, method_resolution};
use hir_ty::{db::HirDatabase, method_resolution, next_solver::{mapping::ChalkToNextSolver, DbInterner}};
use crate::{
Adt, AsAssocItem, AssocItem, BuiltinType, Const, ConstParam, DocLinkDef, Enum, ExternCrateDecl,
@ -271,7 +271,7 @@ fn resolve_impl_trait_item<'db>(
//
// FIXME: resolve type aliases (which are not yielded by iterate_path_candidates)
_ = method_resolution::iterate_path_candidates(
&canonical,
&canonical.to_nextsolver(DbInterner::new_with(db, Some(environment.krate), environment.block)),
db,
environment,
&traits_in_scope,

View file

@ -5611,7 +5611,11 @@ impl<'db> Type<'db> {
.map_or_else(|| TraitEnvironment::empty(krate.id), |d| db.trait_environment(d));
_ = method_resolution::iterate_method_candidates_dyn(
&canonical,
&canonical.to_nextsolver(DbInterner::new_with(
db,
Some(environment.krate),
environment.block,
)),
db,
environment,
traits_in_scope,
@ -5698,7 +5702,11 @@ impl<'db> Type<'db> {
.map_or_else(|| TraitEnvironment::empty(krate.id), |d| db.trait_environment(d));
_ = method_resolution::iterate_path_candidates(
&canonical,
&canonical.to_nextsolver(DbInterner::new_with(
db,
Some(environment.krate),
environment.block,
)),
db,
environment,
traits_in_scope,