aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/tidy.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/tidy/tidy.py')
-rw-r--r--python/tidy/tidy.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/python/tidy/tidy.py b/python/tidy/tidy.py
index c79f086d747..a1c0e211a7c 100644
--- a/python/tidy/tidy.py
+++ b/python/tidy/tidy.py
@@ -538,7 +538,6 @@ def check_rust(file_name, lines):
prev_open_brace = False
multi_line_string = False
- prev_crate = {}
prev_mod = {}
prev_feature_name = ""
indent = 0
@@ -640,22 +639,6 @@ def check_rust(file_name, lines):
yield (idx + 1, "found an empty line following a {")
prev_open_brace = line.endswith("{")
- # check alphabetical order of extern crates
- if line.startswith("extern crate "):
- # strip "extern crate " from the begin and ";" from the end
- crate_name = line[13:-1]
- if indent not in prev_crate:
- prev_crate[indent] = ""
- if prev_crate[indent] > crate_name and check_alphabetical_order:
- yield(idx + 1, decl_message.format("extern crate declaration")
- + decl_expected.format(prev_crate[indent])
- + 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)