diff options
| author | 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> | 2025-08-19 19:45:39 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-19 19:45:39 +0800 |
| commit | b709cf50dbcc5017816857cf453c99aaca54b394 (patch) | |
| tree | 212b04924efc096c0335bd72971a97c323e60219 /compiler/rustc_resolve | |
| parent | dc945d9e4c86e2986268b41f6bd766b18f18d1f2 (diff) | |
| parent | 9878616a3d66872cb9a358873992cc81efbd1578 (diff) | |
| download | rust-b709cf50dbcc5017816857cf453c99aaca54b394.tar.gz rust-b709cf50dbcc5017816857cf453c99aaca54b394.zip | |
Rollup merge of #145532 - bvanjoi:debug-resolve-module, r=petrochenkov
resolve: debug for block module r? `@petrochenkov`
Diffstat (limited to 'compiler/rustc_resolve')
| -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()), + } } } |
