Skip to content

Commit 94d82c1

Browse files
committed
rollup merge of rust-lang#19457: reem/remove-is-lang-item
Removes a FIXME on closed issue rust-lang#15064. This flag is no longer needed or used since reflection is gone.
2 parents 7112390 + f1e37f9 commit 94d82c1

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

src/librustc_trans/trans/base.rs

+2-11
Original file line numberDiff line numberDiff line change
@@ -983,23 +983,14 @@ pub fn invoke<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
983983
llfn: ValueRef,
984984
llargs: &[ValueRef],
985985
fn_ty: Ty<'tcx>,
986-
call_info: Option<NodeInfo>,
987-
// FIXME(15064) is_lang_item is a horrible hack, please remove it
988-
// at the soonest opportunity.
989-
is_lang_item: bool)
986+
call_info: Option<NodeInfo>)
990987
-> (ValueRef, Block<'blk, 'tcx>) {
991988
let _icx = push_ctxt("invoke_");
992989
if bcx.unreachable.get() {
993990
return (C_null(Type::i8(bcx.ccx())), bcx);
994991
}
995992

996-
// FIXME(15064) Lang item methods may (in the reflect case) not have proper
997-
// types, so doing an attribute lookup will fail.
998-
let attributes = if is_lang_item {
999-
llvm::AttrBuilder::new()
1000-
} else {
1001-
get_fn_llvm_attributes(bcx.ccx(), fn_ty)
1002-
};
993+
let attributes = get_fn_llvm_attributes(bcx.ccx(), fn_ty);
1003994

1004995
match bcx.opt_node_id {
1005996
None => {

src/librustc_trans/trans/callee.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -779,8 +779,7 @@ pub fn trans_call_inner<'a, 'blk, 'tcx, F>(bcx: Block<'blk, 'tcx>,
779779
llfn,
780780
llargs[],
781781
callee_ty,
782-
call_info,
783-
dest.is_none());
782+
call_info);
784783
bcx = b;
785784
llresult = llret;
786785

src/librustc_trans/trans/glue.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ fn trans_struct_drop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
292292
class_did,
293293
&[get_drop_glue_type(bcx.ccx(), t)],
294294
ty::mk_nil(bcx.tcx()));
295-
let (_, variant_cx) = invoke(variant_cx, dtor_addr, args[], dtor_ty, None, false);
295+
let (_, variant_cx) = invoke(variant_cx, dtor_addr, args[], dtor_ty, None);
296296

297297
variant_cx.fcx.pop_and_trans_custom_cleanup_scope(variant_cx, field_scope);
298298
variant_cx

0 commit comments

Comments
 (0)