mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Check for Extra pointer dereferencing. Issue #7640.
This commit is contained in:
parent
37ce248f31
commit
2a99915188
5 changed files with 15 additions and 10 deletions
|
@ -111,6 +111,7 @@ def check_by_line(file_name, contents):
|
|||
check_whitespace(idx, line),
|
||||
check_whatwg_url(idx, line),
|
||||
)
|
||||
|
||||
for error in errors:
|
||||
yield error
|
||||
|
||||
|
@ -349,6 +350,10 @@ def check_rust(file_name, contents):
|
|||
yield (idx + 1 - len(mods) + i, message + expected + found)
|
||||
mods = []
|
||||
|
||||
# There should not be any extra pointer dereferencing
|
||||
if re.search(r": &Vec<", line) is not None:
|
||||
yield (idx + 1, "use &[T] instead of &Vec<T>")
|
||||
|
||||
|
||||
# Avoid flagging <Item=Foo> constructs
|
||||
def is_associated_type(match, line, index):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue