diff options
Diffstat (limited to 'python/tidy')
-rw-r--r-- | python/tidy/servo_tidy/tidy.py | 2 | ||||
-rw-r--r-- | python/tidy/servo_tidy_tests/rust_tidy.rs | 2 | ||||
-rw-r--r-- | python/tidy/servo_tidy_tests/test_tidy.py | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index 5b66d2911e4..fcf51dbf3cb 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -390,6 +390,8 @@ def check_rust(file_name, lines): (r": &Vec<", "use &[T] instead of &Vec<T>", no_filter), # No benefit over using &str (r": &String", "use &str instead of &String", no_filter), + # No benefit to using &Root<T> + (r": &Root<", "use &T instead of &Root<T>", no_filter), (r"^&&", "operators should go at the end of the first line", no_filter), (r"\{[A-Za-z0-9_]+\};", "use statement contains braces for single import", lambda match, line: line.startswith('use ')), diff --git a/python/tidy/servo_tidy_tests/rust_tidy.rs b/python/tidy/servo_tidy_tests/rust_tidy.rs index ef0a53b4b24..bf6437f806d 100644 --- a/python/tidy/servo_tidy_tests/rust_tidy.rs +++ b/python/tidy/servo_tidy_tests/rust_tidy.rs @@ -36,7 +36,7 @@ impl test { } } - fn test_fun2(y : &String, z : &Vec<f32>) -> f32 { + fn test_fun2(y : &String, z : &Vec<f32>, r: &Root<isize>) -> f32 { let x = true; x && x; diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py index c9291c1c2f2..a50532fbade 100644 --- a/python/tidy/servo_tidy_tests/test_tidy.py +++ b/python/tidy/servo_tidy_tests/test_tidy.py @@ -74,6 +74,7 @@ class CheckTidiness(unittest.TestCase): self.assertEqual('extra space before :', errors.next()[2]) self.assertEqual('use &[T] instead of &Vec<T>', errors.next()[2]) self.assertEqual('use &str instead of &String', errors.next()[2]) + 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.assertNoMoreErrors(errors) |