about summary refs log tree commit diff
path: root/src/librustc
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2019-08-11 15:18:49 -0400
committerGitHub <noreply@github.com>2019-08-11 15:18:49 -0400
commit4229dc3538bbf473ab142fd708bc3ebbebb7bc1f (patch)
treea0e1a3e4c92814f3487c1df5d13af152f1d496dc /src/librustc
parent86ceab47b1caff6928ba04dbcffd058f6cd37a29 (diff)
parent43de341f19e702f6efa2fe30c07dd5099b1a8efb (diff)
downloadrust-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.rs4
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()