diff options
| author | lcnr <rust@lcnr.de> | 2022-03-08 15:39:52 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2022-03-08 15:39:52 +0100 |
| commit | b8135fd5c8e51a0578cff82096cbbf7e5d57fdeb (patch) | |
| tree | 424db470532660fc53ca3239561ad29f137e5fd9 /compiler/rustc_infer | |
| parent | 67b3e8183830c7af4e06a9aa91de4d1be3c860f7 (diff) | |
| download | rust-b8135fd5c8e51a0578cff82096cbbf7e5d57fdeb.tar.gz rust-b8135fd5c8e51a0578cff82096cbbf7e5d57fdeb.zip | |
add `#[rustc_pass_by_value]` to more types
Diffstat (limited to 'compiler/rustc_infer')
| -rw-r--r-- | compiler/rustc_infer/src/infer/free_regions.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_infer/src/infer/free_regions.rs b/compiler/rustc_infer/src/infer/free_regions.rs index 187c67df3eb..082eb1bf111 100644 --- a/compiler/rustc_infer/src/infer/free_regions.rs +++ b/compiler/rustc_infer/src/infer/free_regions.rs @@ -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 }) } } |
