trans: Remove unused ref_id from monomorphic_fn.
This commit is contained in:
parent
0c01f6e149
commit
c284099f56
@ -446,14 +446,9 @@ pub fn trans_fn_ref_with_substs<'a, 'tcx>(
|
||||
// Should be either intra-crate or inlined.
|
||||
assert_eq!(def_id.krate, LOCAL_CRATE);
|
||||
|
||||
let opt_ref_id = match node {
|
||||
ExprId(id) => if id != 0 { Some(id) } else { None },
|
||||
MethodCallKey(_) => None,
|
||||
};
|
||||
|
||||
let substs = tcx.mk_substs(substs);
|
||||
let (val, fn_ty, must_cast) =
|
||||
monomorphize::monomorphic_fn(ccx, def_id, substs, opt_ref_id);
|
||||
monomorphize::monomorphic_fn(ccx, def_id, substs);
|
||||
if must_cast && node != ExprId(0) {
|
||||
// Monotype of the REFERENCE to the function (type params
|
||||
// are subst'd)
|
||||
|
@ -79,7 +79,7 @@ impl<'bcx, 'tcx> MirContext<'bcx, 'tcx> {
|
||||
let did = inline::maybe_instantiate_inline(bcx.ccx(), did);
|
||||
|
||||
if !substs.types.is_empty() || is_named_tuple_constructor(bcx.tcx(), did) {
|
||||
let (val, fn_ty, _) = monomorphize::monomorphic_fn(bcx.ccx(), did, substs, None);
|
||||
let (val, fn_ty, _) = monomorphize::monomorphic_fn(bcx.ccx(), did, substs);
|
||||
// FIXME: cast fnptr to proper type if necessary
|
||||
OperandRef {
|
||||
ty: fn_ty,
|
||||
|
@ -37,16 +37,9 @@ use std::hash::{Hasher, Hash, SipHasher};
|
||||
|
||||
pub fn monomorphic_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
|
||||
fn_id: DefId,
|
||||
psubsts: &'tcx subst::Substs<'tcx>,
|
||||
ref_id: Option<ast::NodeId>)
|
||||
psubsts: &'tcx subst::Substs<'tcx>)
|
||||
-> (ValueRef, Ty<'tcx>, bool) {
|
||||
debug!("monomorphic_fn(\
|
||||
fn_id={:?}, \
|
||||
real_substs={:?}, \
|
||||
ref_id={:?})",
|
||||
fn_id,
|
||||
psubsts,
|
||||
ref_id);
|
||||
debug!("monomorphic_fn(fn_id={:?}, real_substs={:?})", fn_id, psubsts);
|
||||
|
||||
assert!(!psubsts.types.needs_infer() && !psubsts.types.has_param_types());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user