aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/servo_tidy/tidy.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/tidy/servo_tidy/tidy.py')
-rw-r--r--python/tidy/servo_tidy/tidy.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py
index f9571298562..1336c4d0b56 100644
--- a/python/tidy/servo_tidy/tidy.py
+++ b/python/tidy/servo_tidy/tidy.py
@@ -626,6 +626,10 @@ def check_rust(file_name, lines):
+ decl_found.format(crate_name))
prev_crate[indent] = crate_name
+ if line == "}":
+ for i in [i for i in prev_crate.keys() if i > indent]:
+ del prev_crate[i]
+
# check alphabetical order of feature attributes in lib.rs files
if is_lib_rs_file:
match = re.search(r"#!\[feature\((.*)\)\]", line)