diff --git a/src/ast/types.rs b/src/ast/types.rs index 4ca6f58a52..59d89f4ec7 100644 --- a/src/ast/types.rs +++ b/src/ast/types.rs @@ -89,9 +89,6 @@ pub struct Scope<'a> { pub uses_locals: bool, /// A map from bound name to binding index. pub values: FxHashMap<&'a str, usize>, - /// A list of (name, index) pairs for bindings that were overridden in the - /// scope. - pub overridden: Vec<(&'a str, usize)>, } impl<'a> Scope<'a> { @@ -102,7 +99,6 @@ impl<'a> Scope<'a> { import_starred: false, uses_locals: false, values: FxHashMap::default(), - overridden: Vec::new(), } } } diff --git a/src/checkers/ast.rs b/src/checkers/ast.rs index 0199c52219..a4d7a7109b 100644 --- a/src/checkers/ast.rs +++ b/src/checkers/ast.rs @@ -4508,11 +4508,7 @@ impl<'a> Checker<'a> { .rules .enabled(&Rule::TypingOnlyStandardLibraryImport) { - for (.., index) in scope - .values - .iter() - .chain(scope.overridden.iter().map(|(a, b)| (a, b))) - { + for (.., index) in &scope.values { let binding = &self.bindings[*index]; if let Some(diagnostic) = @@ -4549,11 +4545,7 @@ impl<'a> Checker<'a> { let mut ignored: FxHashMap> = FxHashMap::default(); - for (name, index) in scope - .values - .iter() - .chain(scope.overridden.iter().map(|(a, b)| (a, b))) - { + for (name, index) in &scope.values { let binding = &self.bindings[*index]; let full_name = match &binding.kind {