Copy ty::Instance instead of passing by reference
ty::Instance is small and Copy, we should not be adding additional indirection.
This commit is contained in:
parent
2b78e10ac1
commit
43de341f19
3 changed files with 7 additions and 7 deletions
|
|
@ -2518,7 +2518,7 @@ where
|
|||
+ HasTyCtxt<'tcx>
|
||||
+ HasParamEnv<'tcx>,
|
||||
{
|
||||
fn of_instance(cx: &C, instance: &ty::Instance<'tcx>) -> Self;
|
||||
fn of_instance(cx: &C, instance: ty::Instance<'tcx>) -> Self;
|
||||
fn new(cx: &C, sig: ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> Self;
|
||||
fn new_vtable(cx: &C, sig: ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> Self;
|
||||
fn new_internal(
|
||||
|
|
@ -2538,7 +2538,7 @@ where
|
|||
+ HasTyCtxt<'tcx>
|
||||
+ HasParamEnv<'tcx>,
|
||||
{
|
||||
fn of_instance(cx: &C, instance: &ty::Instance<'tcx>) -> Self {
|
||||
fn of_instance(cx: &C, instance: ty::Instance<'tcx>) -> Self {
|
||||
let sig = instance.fn_sig(cx.tcx());
|
||||
let sig = cx
|
||||
.tcx()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue