]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_infer/src/infer/free_regions.rs
New upstream version 1.61.0+dfsg1
[rustc.git] / compiler / rustc_infer / src / infer / free_regions.rs
index 187c67df3eb31cd552c31f3066f03ab13beb717a..082eb1bf11101456b1896ee85ed62a57158481d0 100644 (file)
@@ -86,7 +86,7 @@ impl<'tcx> FreeRegionMap<'tcx> {
 
     /// Check whether `r_a <= r_b` is found in the relation.
     fn check_relation(&self, r_a: Region<'tcx>, r_b: Region<'tcx>) -> bool {
-        r_a == r_b || self.relation.contains(&r_a, &r_b)
+        r_a == r_b || self.relation.contains(r_a, r_b)
     }
 
     /// True for free regions other than `'static`.
@@ -119,9 +119,9 @@ impl<'tcx> FreeRegionMap<'tcx> {
         let result = if r_a == r_b {
             r_a
         } else {
-            match self.relation.postdom_upper_bound(&r_a, &r_b) {
+            match self.relation.postdom_upper_bound(r_a, r_b) {
                 None => tcx.lifetimes.re_static,
-                Some(r) => *r,
+                Some(r) => r,
             }
         };
         debug!("lub_free_regions(r_a={:?}, r_b={:?}) = {:?}", r_a, r_b, result);
@@ -132,6 +132,6 @@ impl<'tcx> FreeRegionMap<'tcx> {
 impl<'a, 'tcx> Lift<'tcx> for FreeRegionMap<'a> {
     type Lifted = FreeRegionMap<'tcx>;
     fn lift_to_tcx(self, tcx: TyCtxt<'tcx>) -> Option<FreeRegionMap<'tcx>> {
-        self.relation.maybe_map(|&fr| tcx.lift(fr)).map(|relation| FreeRegionMap { relation })
+        self.relation.maybe_map(|fr| tcx.lift(fr)).map(|relation| FreeRegionMap { relation })
     }
 }