From cd9195056c7a83b44ed439ef607b94ed4824431d Mon Sep 17 00:00:00 2001 From: lberrymage Date: Sat, 21 Dec 2019 12:44:34 -0900 Subject: Add lint check for `&DomRoot` `&DomRoot is strictly less expressive than `&T`, so using it is pointless. --- python/tidy/servo_tidy/tidy.py | 1 + 1 file changed, 1 insertion(+) (limited to 'python/tidy/servo_tidy/tidy.py') 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>", "Banned type DomRefCell> detected. Use MutDom instead", no_filter), # No benefit to using &Root (r": &Root<", "use &T instead of &Root", no_filter), + (r": &DomRoot<", "use &T instead of &DomRoot", 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", -- cgit v1.2.3