Skip to content

Commit 8334b1a

Browse files
committed
Remove unused fn_def_abis
1 parent b68aa38 commit 8334b1a

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

chalk-integration/src/lowering.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::interner::{ChalkFnAbi, ChalkIr};
22
use chalk_ir::cast::{Cast, Caster};
3-
use chalk_ir::interner::{HasInterner, Interner};
3+
use chalk_ir::interner::HasInterner;
44
use chalk_ir::{
55
self, AdtId, AssocTypeId, BoundVar, ClausePriority, ClosureId, DebruijnIndex, FnDefId,
66
ForeignDefId, ImplId, OpaqueTyId, QuantifiedWhereClauses, Substitution, TraitId, TyKind,
@@ -26,7 +26,6 @@ type TraitIds = BTreeMap<Ident, chalk_ir::TraitId<ChalkIr>>;
2626
type OpaqueTyIds = BTreeMap<Ident, chalk_ir::OpaqueTyId<ChalkIr>>;
2727
type AdtKinds = BTreeMap<chalk_ir::AdtId<ChalkIr>, TypeKind>;
2828
type FnDefKinds = BTreeMap<chalk_ir::FnDefId<ChalkIr>, TypeKind>;
29-
type FnDefAbis = BTreeMap<FnDefId<ChalkIr>, <ChalkIr as Interner>::FnAbi>;
3029
type ClosureKinds = BTreeMap<chalk_ir::ClosureId<ChalkIr>, TypeKind>;
3130
type TraitKinds = BTreeMap<chalk_ir::TraitId<ChalkIr>, TypeKind>;
3231
type AutoTraits = BTreeMap<chalk_ir::TraitId<ChalkIr>, bool>;
@@ -46,7 +45,6 @@ struct Env<'k> {
4645
adt_kinds: &'k AdtKinds,
4746
fn_def_ids: &'k FnDefIds,
4847
fn_def_kinds: &'k FnDefKinds,
49-
fn_def_abis: &'k FnDefAbis,
5048
closure_ids: &'k ClosureIds,
5149
closure_kinds: &'k ClosureKinds,
5250
trait_ids: &'k TraitIds,
@@ -334,7 +332,6 @@ pub fn lower_program(program: &Program) -> LowerResult<LoweredProgram> {
334332
let mut opaque_ty_ids = BTreeMap::new();
335333
let mut adt_kinds = BTreeMap::new();
336334
let mut fn_def_kinds = BTreeMap::new();
337-
let mut fn_def_abis = BTreeMap::new();
338335
let mut closure_kinds = BTreeMap::new();
339336
let mut trait_kinds = BTreeMap::new();
340337
let mut opaque_ty_kinds = BTreeMap::new();
@@ -353,7 +350,6 @@ pub fn lower_program(program: &Program) -> LowerResult<LoweredProgram> {
353350
let id = FnDefId(raw_id);
354351
fn_def_ids.insert(type_kind.name.clone(), id);
355352
fn_def_kinds.insert(id, type_kind);
356-
fn_def_abis.insert(id, lower_fn_abi(&defn.sig.abi)?);
357353
}
358354
Item::ClosureDefn(defn) => {
359355
let type_kind = defn.lower_type_kind()?;
@@ -406,7 +402,6 @@ pub fn lower_program(program: &Program) -> LowerResult<LoweredProgram> {
406402
adt_kinds: &adt_kinds,
407403
fn_def_ids: &fn_def_ids,
408404
fn_def_kinds: &fn_def_kinds,
409-
fn_def_abis: &fn_def_abis,
410405
closure_ids: &closure_ids,
411406
closure_kinds: &closure_kinds,
412407
trait_ids: &trait_ids,
@@ -1681,12 +1676,6 @@ pub fn lower_goal(goal: &Goal, program: &LoweredProgram) -> LowerResult<chalk_ir
16811676
.map(|(&trait_id, datum)| (trait_id, datum.flags.auto))
16821677
.collect();
16831678

1684-
let fn_def_abis: BTreeMap<_, _> = program
1685-
.fn_def_data
1686-
.iter()
1687-
.map(|fn_def_data| (*fn_def_data.0, fn_def_data.1.sig.abi))
1688-
.collect();
1689-
16901679
let env = Env {
16911680
adt_ids: &program.adt_ids,
16921681
fn_def_ids: &program.fn_def_ids,
@@ -1695,7 +1684,6 @@ pub fn lower_goal(goal: &Goal, program: &LoweredProgram) -> LowerResult<chalk_ir
16951684
opaque_ty_ids: &program.opaque_ty_ids,
16961685
adt_kinds: &program.adt_kinds,
16971686
fn_def_kinds: &program.fn_def_kinds,
1698-
fn_def_abis: &fn_def_abis,
16991687
closure_kinds: &program.closure_kinds,
17001688
trait_kinds: &program.trait_kinds,
17011689
opaque_ty_kinds: &program.opaque_ty_kinds,

0 commit comments

Comments
 (0)