diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-08-11 15:18:49 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-11 15:18:49 -0400 |
| commit | 4229dc3538bbf473ab142fd708bc3ebbebb7bc1f (patch) | |
| tree | a0e1a3e4c92814f3487c1df5d13af152f1d496dc /src/librustc | |
| parent | 86ceab47b1caff6928ba04dbcffd058f6cd37a29 (diff) | |
| parent | 43de341f19e702f6efa2fe30c07dd5099b1a8efb (diff) | |
| download | rust-4229dc3538bbf473ab142fd708bc3ebbebb7bc1f.tar.gz rust-4229dc3538bbf473ab142fd708bc3ebbebb7bc1f.zip | |
Rollup merge of #63464 - Mark-Simulacrum:deref-instance, r=eddyb
Copy ty::Instance instead of passing by reference ty::Instance is small and Copy, we should not be adding additional indirection. Fixes #63409. r? @eddyb
Diffstat (limited to 'src/librustc')
| -rw-r--r-- | src/librustc/ty/layout.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/ty/layout.rs b/src/librustc/ty/layout.rs index a9d1fd1fffc..19c753bc304 100644 --- a/src/librustc/ty/layout.rs +++ b/src/librustc/ty/layout.rs @@ -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() |
