Skip to content

Commit 865aabb

Browse files
author
Jorge Aparicio
committed
trans: remove Closure
1 parent 8a6d7a6 commit 865aabb

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/librustc_trans/trans/callee.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ pub struct MethodData {
6666
}
6767

6868
pub enum CalleeData<'tcx> {
69-
Closure(Datum<'tcx, Lvalue>),
70-
7169
// Constructor for enum variant/tuple-like-struct
7270
// i.e. Some, Ok
7371
NamedTupleConstructor(subst::Substs<'tcx>, ty::Disr),
@@ -681,16 +679,6 @@ pub fn trans_call_inner<'a, 'blk, 'tcx, F>(bcx: Block<'blk, 'tcx>,
681679
TraitItem(d) => {
682680
(d.llfn, None, Some(d.llself))
683681
}
684-
Closure(d) => {
685-
// Closures are represented as (llfn, llclosure) pair:
686-
// load the requisite values out.
687-
let pair = d.to_llref();
688-
let llfn = GEPi(bcx, pair, &[0u, abi::FAT_PTR_ADDR]);
689-
let llfn = Load(bcx, llfn);
690-
let llenv = GEPi(bcx, pair, &[0u, abi::FAT_PTR_EXTRA]);
691-
let llenv = Load(bcx, llenv);
692-
(llfn, Some(llenv), None)
693-
}
694682
Intrinsic(node, substs) => {
695683
assert!(abi == synabi::RustIntrinsic);
696684
assert!(dest.is_some());

0 commit comments

Comments
 (0)