From 69e49908f9a3fa2ebee94f67825bce15118c10ba Mon Sep 17 00:00:00 2001 From: Bastian Kauschke Date: Tue, 30 Jun 2020 09:20:08 +0200 Subject: [PATCH] update `equal_up_to_regions` --- src/librustc_mir/transform/validate.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/librustc_mir/transform/validate.rs b/src/librustc_mir/transform/validate.rs index d3f486c815e6c..e794a6949d2f0 100644 --- a/src/librustc_mir/transform/validate.rs +++ b/src/librustc_mir/transform/validate.rs @@ -74,8 +74,8 @@ pub fn equal_up_to_regions( fn relate_with_variance>( &mut self, _: ty::Variance, - a: &T, - b: &T, + a: T, + b: T, ) -> RelateResult<'tcx, T> { // Ignore variance, require types to be exactly the same. self.relate(a, b) @@ -108,8 +108,8 @@ pub fn equal_up_to_regions( fn binders( &mut self, - a: &ty::Binder, - b: &ty::Binder, + a: ty::Binder, + b: ty::Binder, ) -> RelateResult<'tcx, ty::Binder> where T: Relate<'tcx>, @@ -121,7 +121,7 @@ pub fn equal_up_to_regions( // Instantiate and run relation. let mut relator: LifetimeIgnoreRelation<'tcx> = LifetimeIgnoreRelation { tcx: tcx, param_env }; - relator.relate(&src, &dest).is_ok() + relator.relate(src, dest).is_ok() } struct TypeChecker<'a, 'tcx> {