1
1
use crate :: interner:: { ChalkFnAbi , ChalkIr } ;
2
2
use chalk_ir:: cast:: { Cast , Caster } ;
3
- use chalk_ir:: interner:: { HasInterner , Interner } ;
3
+ use chalk_ir:: interner:: HasInterner ;
4
4
use chalk_ir:: {
5
5
self , AdtId , AssocTypeId , BoundVar , ClausePriority , ClosureId , DebruijnIndex , FnDefId ,
6
6
ForeignDefId , ImplId , OpaqueTyId , QuantifiedWhereClauses , Substitution , TraitId , TyKind ,
@@ -26,7 +26,6 @@ type TraitIds = BTreeMap<Ident, chalk_ir::TraitId<ChalkIr>>;
26
26
type OpaqueTyIds = BTreeMap < Ident , chalk_ir:: OpaqueTyId < ChalkIr > > ;
27
27
type AdtKinds = BTreeMap < chalk_ir:: AdtId < ChalkIr > , TypeKind > ;
28
28
type FnDefKinds = BTreeMap < chalk_ir:: FnDefId < ChalkIr > , TypeKind > ;
29
- type FnDefAbis = BTreeMap < FnDefId < ChalkIr > , <ChalkIr as Interner >:: FnAbi > ;
30
29
type ClosureKinds = BTreeMap < chalk_ir:: ClosureId < ChalkIr > , TypeKind > ;
31
30
type TraitKinds = BTreeMap < chalk_ir:: TraitId < ChalkIr > , TypeKind > ;
32
31
type AutoTraits = BTreeMap < chalk_ir:: TraitId < ChalkIr > , bool > ;
@@ -46,7 +45,6 @@ struct Env<'k> {
46
45
adt_kinds : & ' k AdtKinds ,
47
46
fn_def_ids : & ' k FnDefIds ,
48
47
fn_def_kinds : & ' k FnDefKinds ,
49
- fn_def_abis : & ' k FnDefAbis ,
50
48
closure_ids : & ' k ClosureIds ,
51
49
closure_kinds : & ' k ClosureKinds ,
52
50
trait_ids : & ' k TraitIds ,
@@ -334,7 +332,6 @@ pub fn lower_program(program: &Program) -> LowerResult<LoweredProgram> {
334
332
let mut opaque_ty_ids = BTreeMap :: new ( ) ;
335
333
let mut adt_kinds = BTreeMap :: new ( ) ;
336
334
let mut fn_def_kinds = BTreeMap :: new ( ) ;
337
- let mut fn_def_abis = BTreeMap :: new ( ) ;
338
335
let mut closure_kinds = BTreeMap :: new ( ) ;
339
336
let mut trait_kinds = BTreeMap :: new ( ) ;
340
337
let mut opaque_ty_kinds = BTreeMap :: new ( ) ;
@@ -353,7 +350,6 @@ pub fn lower_program(program: &Program) -> LowerResult<LoweredProgram> {
353
350
let id = FnDefId ( raw_id) ;
354
351
fn_def_ids. insert ( type_kind. name . clone ( ) , id) ;
355
352
fn_def_kinds. insert ( id, type_kind) ;
356
- fn_def_abis. insert ( id, lower_fn_abi ( & defn. sig . abi ) ?) ;
357
353
}
358
354
Item :: ClosureDefn ( defn) => {
359
355
let type_kind = defn. lower_type_kind ( ) ?;
@@ -406,7 +402,6 @@ pub fn lower_program(program: &Program) -> LowerResult<LoweredProgram> {
406
402
adt_kinds : & adt_kinds,
407
403
fn_def_ids : & fn_def_ids,
408
404
fn_def_kinds : & fn_def_kinds,
409
- fn_def_abis : & fn_def_abis,
410
405
closure_ids : & closure_ids,
411
406
closure_kinds : & closure_kinds,
412
407
trait_ids : & trait_ids,
@@ -1681,12 +1676,6 @@ pub fn lower_goal(goal: &Goal, program: &LoweredProgram) -> LowerResult<chalk_ir
1681
1676
. map ( |( & trait_id, datum) | ( trait_id, datum. flags . auto ) )
1682
1677
. collect ( ) ;
1683
1678
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
-
1690
1679
let env = Env {
1691
1680
adt_ids : & program. adt_ids ,
1692
1681
fn_def_ids : & program. fn_def_ids ,
@@ -1695,7 +1684,6 @@ pub fn lower_goal(goal: &Goal, program: &LoweredProgram) -> LowerResult<chalk_ir
1695
1684
opaque_ty_ids : & program. opaque_ty_ids ,
1696
1685
adt_kinds : & program. adt_kinds ,
1697
1686
fn_def_kinds : & program. fn_def_kinds ,
1698
- fn_def_abis : & fn_def_abis,
1699
1687
closure_kinds : & program. closure_kinds ,
1700
1688
trait_kinds : & program. trait_kinds ,
1701
1689
opaque_ty_kinds : & program. opaque_ty_kinds ,
0 commit comments