aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/script/dom/htmlformelement.rs2
-rw-r--r--python/tidy/servo_tidy/tidy.py1
-rw-r--r--python/tidy/servo_tidy_tests/rust_tidy.rs8
-rw-r--r--python/tidy/servo_tidy_tests/test_tidy.py3
4 files changed, 13 insertions, 1 deletions
diff --git a/components/script/dom/htmlformelement.rs b/components/script/dom/htmlformelement.rs
index 268b04a159f..9622914b5b5 100644
--- a/components/script/dom/htmlformelement.rs
+++ b/components/script/dom/htmlformelement.rs
@@ -593,7 +593,7 @@ impl HTMLFormElement {
"file" | "textarea" => (), // TODO
_ => {
datum.name = clean_crlf(&datum.name);
- datum.value = FormDatumValue::String(clean_crlf( match datum.value {
+ datum.value = FormDatumValue::String(clean_crlf(match datum.value {
FormDatumValue::String(ref s) => s,
FormDatumValue::File(_) => unreachable!()
}));
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py
index 081352f8a43..4b02f9dbf07 100644
--- a/python/tidy/servo_tidy/tidy.py
+++ b/python/tidy/servo_tidy/tidy.py
@@ -483,6 +483,7 @@ def check_rust(file_name, lines):
(r"\{[A-Za-z0-9_]+\};", "use statement contains braces for single import",
lambda match, line: line.startswith('use ')),
(r"^\s*else {", "else braces should be on the same line", no_filter),
+ (r"[^$ ]\([ \t]", "extra space after (", no_filter),
]
for pattern, message, filter_func in regex_rules:
diff --git a/python/tidy/servo_tidy_tests/rust_tidy.rs b/python/tidy/servo_tidy_tests/rust_tidy.rs
index 9bc37070613..358fce3a082 100644
--- a/python/tidy/servo_tidy_tests/rust_tidy.rs
+++ b/python/tidy/servo_tidy_tests/rust_tidy.rs
@@ -49,4 +49,12 @@ impl test {
}
}
+ type Text_Fun3 = fn( i32) -> i32;
+
+ fn test_fun3<Text_Fun3>( y: Text_Fun3) {
+ test_fun( 1);
+ }
+
+ // Should not be triggered
+ macro_rules! test_macro ( ( $( $fun:ident = $flag:ident ; )* ) => ());
}
diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py
index 998967c617f..52371b944bb 100644
--- a/python/tidy/servo_tidy_tests/test_tidy.py
+++ b/python/tidy/servo_tidy_tests/test_tidy.py
@@ -109,6 +109,9 @@ class CheckTidiness(unittest.TestCase):
self.assertEqual('use &T instead of &Root<T>', errors.next()[2])
self.assertEqual('operators should go at the end of the first line', errors.next()[2])
self.assertEqual('else braces should be on the same line', errors.next()[2])
+ self.assertEqual('extra space after (', errors.next()[2])
+ self.assertEqual('extra space after (', errors.next()[2])
+ self.assertEqual('extra space after (', errors.next()[2])
self.assertNoMoreErrors(errors)
def test_spec_link(self):