about summary refs log tree commit diff
path: root/src/librustc_middle/middle
diff options
context:
space:
mode:
authormarmeladema <xademax@gmail.com>2020-04-16 20:36:32 +0100
committermarmeladema <xademax@gmail.com>2020-04-23 23:14:07 +0100
commitbfce24aa675072c832e5160acdefc4e98b7fe8f3 (patch)
tree0f34ec764cbfad806fa1880f0125edf93b0af9e6 /src/librustc_middle/middle
parent6148db719f34a35099eff46097b5d2d9770892e9 (diff)
downloadrust-bfce24aa675072c832e5160acdefc4e98b7fe8f3.tar.gz
rust-bfce24aa675072c832e5160acdefc4e98b7fe8f3.zip
Modify `as_local_hir_id` to return a bare `HirId`
Diffstat (limited to 'src/librustc_middle/middle')
-rw-r--r--src/librustc_middle/middle/region.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_middle/middle/region.rs b/src/librustc_middle/middle/region.rs
index 41f712f600a..c3eeea7662b 100644
--- a/src/librustc_middle/middle/region.rs
+++ b/src/librustc_middle/middle/region.rs
@@ -554,7 +554,7 @@ impl<'tcx> ScopeTree {
     pub fn early_free_scope(&self, tcx: TyCtxt<'tcx>, br: &ty::EarlyBoundRegion) -> Scope {
         let param_owner = tcx.parent(br.def_id).unwrap();
 
-        let param_owner_id = tcx.hir().as_local_hir_id(param_owner.expect_local()).unwrap();
+        let param_owner_id = tcx.hir().as_local_hir_id(param_owner.expect_local());
         let scope = tcx
             .hir()
             .maybe_body_owned_by(param_owner_id)
@@ -595,7 +595,7 @@ impl<'tcx> ScopeTree {
         // on the same function that they ended up being freed in.
         assert_eq!(param_owner, fr.scope);
 
-        let param_owner_id = tcx.hir().as_local_hir_id(param_owner.expect_local()).unwrap();
+        let param_owner_id = tcx.hir().as_local_hir_id(param_owner.expect_local());
         let body_id = tcx.hir().body_owned_by(param_owner_id);
         Scope { id: tcx.hir().body(body_id).value.hir_id.local_id, data: ScopeData::CallSite }
     }