check_missing_items.py: Don't overwrite ty
in loop
Because python doesn't have lexical scope, loop variables persist after the loop is exited, set to the value of the last itteration ``` >>> i = 0 >>> for i in range(10): pass ... >>> i 9 ``` This causes the `ty` variable to be changed, causing unexpected crashes on ``` pub type RefFn<'a> = &'a dyn for<'b> Fn(&'a i32) -> i32; ```
This commit is contained in:
parent
1202bbaf48
commit
95729dcc73
@ -88,8 +88,8 @@ def check_type(ty):
|
||||
for bound in binding["binding"]["constraint"]:
|
||||
check_generic_bound(bound)
|
||||
elif "parenthesized" in args:
|
||||
for ty in args["parenthesized"]["inputs"]:
|
||||
check_type(ty)
|
||||
for input_ty in args["parenthesized"]["inputs"]:
|
||||
check_type(input_ty)
|
||||
if args["parenthesized"]["output"]:
|
||||
check_type(args["parenthesized"]["output"])
|
||||
if not valid_id(ty["inner"]["id"]):
|
||||
|
Loading…
x
Reference in New Issue
Block a user