Skip to content

Commit 77c3002

Browse files
cjgillotoli-obk
andcommitted
Apply suggestions from code review
Co-authored-by: Oli Scherer <[email protected]>
1 parent 659b0a2 commit 77c3002

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_hir/src/hir.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ pub struct Crate<'hir> {
671671
pub attrs: BTreeMap<HirId, &'hir [Attribute]>,
672672
}
673673

674-
impl<'hir> Crate<'hir> {
674+
impl Crate<'hir> {
675675
pub fn module(&self) -> &'hir Mod<'hir> {
676676
if let Some(OwnerNode::Crate(m)) = self.owners[CRATE_DEF_ID] { m } else { panic!() }
677677
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ impl<'hir> Map<'hir> {
160160
pub fn root_module(&self) -> &'hir Mod<'hir> {
161161
match self.tcx.hir_owner(CRATE_DEF_ID).map(|o| o.node) {
162162
Some(OwnerNode::Crate(item)) => item,
163-
_ => panic!(),
163+
_ => bug!(),
164164
}
165165
}
166166

0 commit comments

Comments
 (0)