aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/servo_tidy_tests
diff options
context:
space:
mode:
authorlberrymage <mageelog@gmail.com>2019-12-21 12:44:34 -0900
committerlberrymage <mageelog@gmail.com>2019-12-21 12:44:35 -0900
commitcd9195056c7a83b44ed439ef607b94ed4824431d (patch)
tree3d60bc161b9553746290dfe6e785fda02143b131 /python/tidy/servo_tidy_tests
parentbac9903fbeed0a394a86c0091e727aada665433d (diff)
downloadservo-cd9195056c7a83b44ed439ef607b94ed4824431d.tar.gz
servo-cd9195056c7a83b44ed439ef607b94ed4824431d.zip
Add lint check for `&DomRoot<T>`
`&DomRoot<T> is strictly less expressive than `&T`, so using it is pointless.
Diffstat (limited to 'python/tidy/servo_tidy_tests')
-rw-r--r--python/tidy/servo_tidy_tests/rust_tidy.rs2
-rw-r--r--python/tidy/servo_tidy_tests/test_tidy.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/python/tidy/servo_tidy_tests/rust_tidy.rs b/python/tidy/servo_tidy_tests/rust_tidy.rs
index 4b6c35b85cb..78b47a14401 100644
--- a/python/tidy/servo_tidy_tests/rust_tidy.rs
+++ b/python/tidy/servo_tidy_tests/rust_tidy.rs
@@ -38,7 +38,7 @@ impl test {
}
}
- fn test_fun2(y : &String, z : &Vec<f32>, r: &Root<isize>) -> () {
+ fn test_fun2(y : &String, z : &Vec<f32>, r: &Root<isize>, s: &DomRoot<isize>) -> () {
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 c13710057ab..441e9250c51 100644
--- a/python/tidy/servo_tidy_tests/test_tidy.py
+++ b/python/tidy/servo_tidy_tests/test_tidy.py
@@ -112,6 +112,7 @@ class CheckTidiness(unittest.TestCase):
self.assertEqual('use &[T] instead of &Vec<T>', next(errors)[2])
self.assertEqual('use &str instead of &String', next(errors)[2])
self.assertEqual('use &T instead of &Root<T>', next(errors)[2])
+ self.assertEqual('use &T instead of &DomRoot<T>', next(errors)[2])
self.assertEqual('encountered function signature with -> ()', next(errors)[2])
self.assertEqual('operators should go at the end of the first line', next(errors)[2])
self.assertNoMoreErrors(errors)