Skip to content

Commit cfeefb1

Browse files
Apply suggestions from code review
Co-authored-by: Vadim Petrochenkov <[email protected]>
1 parent f5da7c4 commit cfeefb1

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_middle/src/hir/map

1 file changed

+2
-2
lines changed

compiler/rustc_middle/src/hir/map/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,15 @@ impl<'tcx> TyCtxt<'tcx> {
150150
/// Retrieves the `hir::Node` corresponding to `id`, panicking if it cannot be found.
151151
#[track_caller]
152152
pub fn hir_node(self, id: HirId) -> Node<'tcx> {
153-
self.opt_hir_node(id).unwrap_or_else(|| bug!("couldn't find hir id {} in the HIR map", id))
153+
self.opt_hir_node(id).unwrap_or_else(|| bug!("couldn't find HIR node for hir id {id:?}"))
154154
}
155155

156156
/// Retrieves the `hir::Node` corresponding to `id`, panicking if it cannot be found.
157157
#[inline]
158158
#[track_caller]
159159
pub fn hir_node_by_def_id(self, id: LocalDefId) -> Node<'tcx> {
160160
self.opt_hir_node_by_def_id(id)
161-
.unwrap_or_else(|| bug!("couldn't find {:?} in the HIR map", id))
161+
.unwrap_or_else(|| bug!("couldn't find HIR node for def id {id:?}"))
162162
}
163163
}
164164

0 commit comments

Comments
 (0)