diff options
| author | Ralf Jung <post@ralfj.de> | 2025-08-20 08:14:57 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-20 08:14:57 +0000 |
| commit | 46765526e33dca91b3860715097aa43efe2cf5da (patch) | |
| tree | c790c7a6d94c4d2c96b820cc93804ec55af4bdbe /compiler/rustc_resolve/src/lib.rs | |
| parent | 49abb66e5d199497830b88397f2218cbe4b978f1 (diff) | |
| parent | 5556212823c359619302748e9280258c11799db1 (diff) | |
| download | rust-46765526e33dca91b3860715097aa43efe2cf5da.tar.gz rust-46765526e33dca91b3860715097aa43efe2cf5da.zip | |
Merge pull request #4532 from rust-lang/rustup-2025-08-20
Automatic Rustup
Diffstat (limited to 'compiler/rustc_resolve/src/lib.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index ca9c124fca6..2063c46124c 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()), + } } } @@ -1267,6 +1270,10 @@ pub struct Resolver<'ra, 'tcx> { mods_with_parse_errors: FxHashSet<DefId>, + /// Whether `Resolver::register_macros_for_all_crates` has been called once already, as we + /// don't need to run it more than once. + all_crate_macros_already_registered: bool = false, + // Stores pre-expansion and pre-placeholder-fragment-insertion names for `impl Trait` types // that were encountered during resolution. These names are used to generate item names // for APITs, so we don't want to leak details of resolution into these names. |
