}
let sym = tcx.symbol_name(instance).name.as_str();
- debug!("get_fn({:?}: {:?}) => {}", instance, instance.ty(cx.tcx()), sym);
+ debug!("get_fn({:?}: {:?}) => {}", instance, instance.monomorphic_ty(cx.tcx()), sym);
let fn_abi = FnAbi::of_instance(cx, instance, &[]);
} else {
// This is a monomorphization of a generic function
// defined in an upstream crate.
- if cx
- .tcx
- .upstream_monomorphizations_for(instance_def_id)
- .map(|set| set.contains_key(instance.substs))
- .unwrap_or(false)
- {
+ if instance.upstream_monomorphization(tcx).is_some() {
// This is instantiated in another crate. It cannot
// be `hidden`.
} else {