From 12747f188a9dba7b13cf1ccb01fef74c6ce3294e Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 14 Nov 2024 11:34:49 +1100 Subject: [PATCH] Remove `Resolver::empty_disambiguator`. It was added in #115367 for anonymous ADTs. Those changes were then reverted in #131045, but `empty_disambiguator` was left behind, perhaps by mistake. It seems to be unnecessary. --- compiler/rustc_resolve/src/lib.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index cf37a4e3389..e382295b8f6 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -1082,8 +1082,6 @@ pub struct Resolver<'ra, 'tcx> { binding_parent_modules: FxHashMap, Module<'ra>>, underscore_disambiguator: u32, - /// Disambiguator for anonymous adts. - empty_disambiguator: u32, /// Maps glob imports to the names of items actually imported. glob_map: FxHashMap>, @@ -1462,7 +1460,6 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { module_children: Default::default(), trait_map: NodeMap::default(), underscore_disambiguator: 0, - empty_disambiguator: 0, empty_module, module_map, block_map: Default::default(), @@ -1841,9 +1838,6 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { let disambiguator = if ident.name == kw::Underscore { self.underscore_disambiguator += 1; self.underscore_disambiguator - } else if ident.name == kw::Empty { - self.empty_disambiguator += 1; - self.empty_disambiguator } else { 0 };