Remove polymorphization
This commit is contained in:
parent
8dc83770f7
commit
711c8cc690
92 changed files with 59 additions and 2643 deletions
|
@ -432,11 +432,8 @@ fn push_debuginfo_type_name<'tcx>(
|
|||
push_closure_or_coroutine_name(tcx, def_id, args, qualified, output, visited);
|
||||
}
|
||||
}
|
||||
// Type parameters from polymorphized functions.
|
||||
ty::Param(_) => {
|
||||
write!(output, "{t:?}").unwrap();
|
||||
}
|
||||
ty::Error(_)
|
||||
ty::Param(_)
|
||||
| ty::Error(_)
|
||||
| ty::Infer(_)
|
||||
| ty::Placeholder(..)
|
||||
| ty::Alias(..)
|
||||
|
|
|
@ -847,10 +847,13 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
|
||||
let (instance, mut llfn) = match *callee.layout.ty.kind() {
|
||||
ty::FnDef(def_id, args) => (
|
||||
Some(
|
||||
ty::Instance::expect_resolve(bx.tcx(), bx.typing_env(), def_id, args, fn_span)
|
||||
.polymorphize(bx.tcx()),
|
||||
),
|
||||
Some(ty::Instance::expect_resolve(
|
||||
bx.tcx(),
|
||||
bx.typing_env(),
|
||||
def_id,
|
||||
args,
|
||||
fn_span,
|
||||
)),
|
||||
None,
|
||||
),
|
||||
ty::FnPtr(..) => (None, Some(callee.immediate())),
|
||||
|
|
|
@ -478,8 +478,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
def_id,
|
||||
args,
|
||||
)
|
||||
.unwrap()
|
||||
.polymorphize(bx.cx().tcx());
|
||||
.unwrap();
|
||||
OperandValue::Immediate(bx.get_fn_addr(instance))
|
||||
}
|
||||
_ => bug!("{} cannot be reified to a fn ptr", operand.layout.ty),
|
||||
|
@ -493,8 +492,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
def_id,
|
||||
args,
|
||||
ty::ClosureKind::FnOnce,
|
||||
)
|
||||
.polymorphize(bx.cx().tcx());
|
||||
);
|
||||
OperandValue::Immediate(bx.cx().get_fn_addr(instance))
|
||||
}
|
||||
_ => bug!("{} cannot be cast to a fn ptr", operand.layout.ty),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue