mirror of
https://github.com/servo/servo.git
synced 2025-06-08 16:43:28 +00:00
Add lint check for &DomRoot<T>
`&DomRoot<T> is strictly less expressive than `&T`, so using it is pointless.
This commit is contained in:
parent
bac9903fbe
commit
cd9195056c
9 changed files with 13 additions and 13 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue