Skip to content

Commit da3929e

Browse files
authored
Rollup merge of rust-lang#145532 - bvanjoi:debug-resolve-module, r=petrochenkov
resolve: debug for block module r? ``@petrochenkov``
2 parents 87909b3 + 9878616 commit da3929e

File tree

1 file changed

+4
-1
lines changed
  • compiler/rustc_resolve/src

1 file changed

+4
-1
lines changed

compiler/rustc_resolve/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,10 @@ impl<'ra> std::ops::Deref for Module<'ra> {
781781

782782
impl<'ra> fmt::Debug for Module<'ra> {
783783
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
784-
write!(f, "{:?}", self.res())
784+
match self.kind {
785+
ModuleKind::Block => write!(f, "block"),
786+
ModuleKind::Def(..) => write!(f, "{:?}", self.res()),
787+
}
785788
}
786789
}
787790

0 commit comments

Comments
 (0)