diff options
| author | bohan <bohan-zhang@foxmail.com> | 2025-08-17 22:37:42 +0800 |
|---|---|---|
| committer | bohan <bohan-zhang@foxmail.com> | 2025-08-17 22:37:42 +0800 |
| commit | 9878616a3d66872cb9a358873992cc81efbd1578 (patch) | |
| tree | 57d7f7521ee42cd284767bd466f0b1dceb94ab9d /compiler/rustc_resolve/src/lib.rs | |
| parent | 425a9c0a0e365c0b8c6cfd00c2ded83a73bed9a0 (diff) | |
| download | rust-9878616a3d66872cb9a358873992cc81efbd1578.tar.gz rust-9878616a3d66872cb9a358873992cc81efbd1578.zip | |
resolve: debug for block module
Diffstat (limited to 'compiler/rustc_resolve/src/lib.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index ca9c124fca6..04ff76e6bd6 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -781,7 +781,10 @@ impl<'ra> std::ops::Deref for Module<'ra> { impl<'ra> fmt::Debug for Module<'ra> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{:?}", self.res()) + match self.kind { + ModuleKind::Block => write!(f, "block"), + ModuleKind::Def(..) => write!(f, "{:?}", self.res()), + } } } |
