diff options
author | lberrymage <mageelog@gmail.com> | 2019-12-21 12:44:34 -0900 |
---|---|---|
committer | lberrymage <mageelog@gmail.com> | 2019-12-21 12:44:35 -0900 |
commit | cd9195056c7a83b44ed439ef607b94ed4824431d (patch) | |
tree | 3d60bc161b9553746290dfe6e785fda02143b131 /python/tidy/servo_tidy | |
parent | bac9903fbeed0a394a86c0091e727aada665433d (diff) | |
download | servo-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')
-rw-r--r-- | python/tidy/servo_tidy/tidy.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index da432d0c0f8..cbbb1a542d4 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -623,6 +623,7 @@ def check_rust(file_name, lines): (r"DomRefCell<Heap<.+>>", "Banned type DomRefCell<Heap<T>> detected. Use MutDom<T> instead", no_filter), # No benefit to using &Root<T> (r": &Root<", "use &T instead of &Root<T>", no_filter), + (r": &DomRoot<", "use &T instead of &DomRoot<T>", no_filter), (r"^&&", "operators should go at the end of the first line", no_filter), # This particular pattern is not reentrant-safe in script_thread.rs (r"match self.documents.borrow", "use a separate variable for the match expression", |