Skip to content

Commit 95fb7bf

Browse files
committed
Just unwrap() instead of unwrap_or(DUMMY_HIR_ID).
A valid hir id should always be returned in this case.
1 parent 830e4fd commit 95fb7bf

File tree

1 file changed

+1
-1
lines changed
  • src/librustc_infer/infer/error_reporting

1 file changed

+1
-1
lines changed

src/librustc_infer/infer/error_reporting/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ fn msg_span_from_early_bound_and_free_regions(
191191
let sm = tcx.sess.source_map();
192192

193193
let scope = region.free_region_binding_scope(tcx);
194-
let node = tcx.hir().as_local_hir_id(scope).unwrap_or(hir::DUMMY_HIR_ID);
194+
let node = tcx.hir().as_local_hir_id(scope).unwrap();
195195
let tag = match tcx.hir().find(node) {
196196
Some(Node::Block(_)) | Some(Node::Expr(_)) => "body",
197197
Some(Node::Item(it)) => item_scope_tag(&it),

0 commit comments

Comments
 (0)