Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/layout/tests.rs')
-rw-r--r--crates/hir-ty/src/layout/tests.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/crates/hir-ty/src/layout/tests.rs b/crates/hir-ty/src/layout/tests.rs
index 6960e230a6..d6f0ed3dc0 100644
--- a/crates/hir-ty/src/layout/tests.rs
+++ b/crates/hir-ty/src/layout/tests.rs
@@ -3,7 +3,7 @@ use either::Either;
use hir_def::db::DefDatabase;
use project_model::{Sysroot, toolchain_info::QueryConfig};
use rustc_hash::FxHashMap;
-use rustc_type_ir::inherent::{GenericArgs as _, Ty as _};
+use rustc_type_ir::inherent::GenericArgs as _;
use syntax::ToSmolStr;
use test_fixture::WithFixture;
use triomphe::Arc;
@@ -11,7 +11,7 @@ use triomphe::Arc;
use crate::{
db::HirDatabase,
layout::{Layout, LayoutError},
- next_solver::{AdtDef, DbInterner, GenericArgs, mapping::ChalkToNextSolver},
+ next_solver::{DbInterner, GenericArgs},
setup_tracing,
test_db::TestDB,
};
@@ -84,7 +84,7 @@ fn eval_goal(
let goal_ty = match adt_or_type_alias_id {
Either::Left(adt_id) => crate::next_solver::Ty::new_adt(
interner,
- AdtDef::new(adt_id, interner),
+ adt_id,
GenericArgs::identity_for_item(interner, adt_id.into()),
),
Either::Right(ty_id) => db.ty(ty_id.into()).instantiate_identity(),
@@ -133,11 +133,8 @@ fn eval_expr(
.unwrap()
.0;
let infer = db.infer(function_id.into());
- let goal_ty = infer.type_of_binding[b].clone();
- salsa::attach(&db, || {
- let interner = DbInterner::new_with(&db, None, None);
- db.layout_of_ty(goal_ty.to_nextsolver(interner), db.trait_environment(function_id.into()))
- })
+ let goal_ty = infer.type_of_binding[b];
+ salsa::attach(&db, || db.layout_of_ty(goal_ty, db.trait_environment(function_id.into())))
}
#[track_caller]