We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 659b0a2 commit 77c3002Copy full SHA for 77c3002
compiler/rustc_hir/src/hir.rs
@@ -671,7 +671,7 @@ pub struct Crate<'hir> {
671
pub attrs: BTreeMap<HirId, &'hir [Attribute]>,
672
}
673
674
-impl<'hir> Crate<'hir> {
+impl Crate<'hir> {
675
pub fn module(&self) -> &'hir Mod<'hir> {
676
if let Some(OwnerNode::Crate(m)) = self.owners[CRATE_DEF_ID] { m } else { panic!() }
677
compiler/rustc_middle/src/hir/map/mod.rs
@@ -160,7 +160,7 @@ impl<'hir> Map<'hir> {
160
pub fn root_module(&self) -> &'hir Mod<'hir> {
161
match self.tcx.hir_owner(CRATE_DEF_ID).map(|o| o.node) {
162
Some(OwnerNode::Crate(item)) => item,
163
- _ => panic!(),
+ _ => bug!(),
164
165
166
0 commit comments