diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2025-07-21 22:55:44 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2025-07-23 16:07:44 +0300 |
| commit | 4b557912af68afa5344e29922457c5df2e784078 (patch) | |
| tree | 79d61578feadbbe25420d83a8070d3e7ae4d761d /compiler/rustc_resolve/src/lib.rs | |
| parent | 67b57f69cac1ccf7fad3986fc0c6ee2022eebd06 (diff) | |
| download | rust-4b557912af68afa5344e29922457c5df2e784078.tar.gz rust-4b557912af68afa5344e29922457c5df2e784078.zip | |
resolve: Change the underscore disambiguator to avoid regressions
Diffstat (limited to 'compiler/rustc_resolve/src/lib.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 948b67a3798..08f1f61ea86 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -579,6 +579,8 @@ struct ModuleData<'ra> { lazy_resolutions: Resolutions<'ra>, /// True if this is a module from other crate that needs to be populated on access. populate_on_access: Cell<bool>, + /// Used to disambiguate underscore items (`const _: T = ...`) in the module. + underscore_disambiguator: Cell<u32>, /// Macro invocations that can expand into items in this module. unexpanded_invocations: RefCell<FxHashSet<LocalExpnId>>, @@ -639,6 +641,7 @@ impl<'ra> ModuleData<'ra> { kind, lazy_resolutions: Default::default(), populate_on_access: Cell::new(is_foreign), + underscore_disambiguator: Cell::new(0), unexpanded_invocations: Default::default(), no_implicit_prelude, glob_importers: RefCell::new(Vec::new()), |
