auto merge of #8149 : omasanori/rust/cleanup, r=alexcrichton
Fixed a warning.
This commit is contained in:
commit
1b018dd9ba
2 changed files with 2 additions and 11 deletions
|
|
@ -2258,15 +2258,13 @@ pub fn register_fn_full(ccx: @mut CrateContext,
|
|||
node_type: ty::t)
|
||||
-> ValueRef {
|
||||
let llfty = type_of_fn_from_ty(ccx, node_type);
|
||||
register_fn_fuller(ccx, sp, sym, node_id, node_type,
|
||||
lib::llvm::CCallConv, llfty)
|
||||
register_fn_fuller(ccx, sp, sym, node_id, lib::llvm::CCallConv, llfty)
|
||||
}
|
||||
|
||||
pub fn register_fn_fuller(ccx: @mut CrateContext,
|
||||
sp: span,
|
||||
sym: ~str,
|
||||
node_id: ast::NodeId,
|
||||
_node_type: ty::t,
|
||||
cc: lib::llvm::CallConv,
|
||||
fn_ty: Type)
|
||||
-> ValueRef {
|
||||
|
|
|
|||
|
|
@ -1154,17 +1154,10 @@ pub fn register_foreign_fn(ccx: @mut CrateContext,
|
|||
-> ValueRef {
|
||||
let _icx = push_ctxt("foreign::register_foreign_fn");
|
||||
|
||||
let t = ty::node_id_to_type(ccx.tcx, node_id);
|
||||
let sym = Cell::new(sym);
|
||||
|
||||
let tys = shim_types(ccx, node_id);
|
||||
do tys.fn_ty.decl_fn |fnty| {
|
||||
register_fn_fuller(ccx,
|
||||
sp,
|
||||
sym.take(),
|
||||
node_id,
|
||||
t,
|
||||
lib::llvm::CCallConv,
|
||||
fnty)
|
||||
register_fn_fuller(ccx, sp, sym.take(), node_id, lib::llvm::CCallConv, fnty)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue