From f1acd28f086bf57b01facce2698a9046b2e6bae1 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Thu, 8 Sep 2022 11:40:55 -0400 Subject: [PATCH] Skip slice error for invalid TypeVar calls --- src/check_ast.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/check_ast.rs b/src/check_ast.rs index 98669ce4f7..0e08a2f0ec 100644 --- a/src/check_ast.rs +++ b/src/check_ast.rs @@ -781,10 +781,10 @@ where } => { if match_name_or_attr(func, "TypeVar") { self.visit_expr(func); - for expr in &args[1..] { + for expr in args.iter().skip(1) { self.visit_annotation(expr); } - for keyword in &keywords[..] { + for keyword in keywords { let KeywordData { arg, value } = &keyword.node; if let Some(id) = arg { if id == "bound" {