diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-06-05 08:48:58 -0500 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-06-05 08:48:58 -0500 |
commit | 93f137f06d36059105d62ffc6829d65f7efe0d9d (patch) | |
tree | d36f28d5a3eb9fd5e0e5f29e81f297632c506e1b /python/tidy/servo_tidy_tests | |
parent | 939da24cc8cda5396180fc3aba707794653b0824 (diff) | |
parent | a17ae724144af9bf997a7ad5de8d1fd72e5b7fdd (diff) | |
download | servo-93f137f06d36059105d62ffc6829d65f7efe0d9d.tar.gz servo-93f137f06d36059105d62ffc6829d65f7efe0d9d.zip |
Auto merge of #11190 - mrmiywj:Root-tidy-checker, r=jdm
add &Root<T> checker
Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data:
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11137 (github issue number if applicable).
Either:
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____
Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11190)
<!-- Reviewable:end -->
Diffstat (limited to 'python/tidy/servo_tidy_tests')
-rw-r--r-- | python/tidy/servo_tidy_tests/rust_tidy.rs | 2 | ||||
-rw-r--r-- | python/tidy/servo_tidy_tests/test_tidy.py | 1 |
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 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) |