mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Fix some messages in the tidy script
It's MutJS<T>, not MutJS<JS<T>>.
This commit is contained in:
parent
532dee36c1
commit
dafcd821f5
3 changed files with 5 additions and 5 deletions
|
@ -576,9 +576,9 @@ def check_rust(file_name, lines):
|
||||||
# There should be any use of banned types:
|
# There should be any use of banned types:
|
||||||
# Cell<JSVal>, Cell<JS<T>>, DOMRefCell<JS<T>>, DOMRefCell<HEAP<T>>
|
# Cell<JSVal>, Cell<JS<T>>, DOMRefCell<JS<T>>, DOMRefCell<HEAP<T>>
|
||||||
(r"(\s|:)+Cell<JSVal>", "Banned type Cell<JSVal> detected. Use MutJS<JSVal> instead", no_filter),
|
(r"(\s|:)+Cell<JSVal>", "Banned type Cell<JSVal> detected. Use MutJS<JSVal> instead", no_filter),
|
||||||
(r"(\s|:)+Cell<JS<.+>>", "Banned type Cell<JS<T>> detected. Use MutJS<JS<T>> instead", no_filter),
|
(r"(\s|:)+Cell<JS<.+>>", "Banned type Cell<JS<T>> detected. Use MutJS<T> instead", no_filter),
|
||||||
(r"DOMRefCell<JS<.+>>", "Banned type DOMRefCell<JS<T>> detected. Use MutJS<JS<T>> instead", no_filter),
|
(r"DOMRefCell<JS<.+>>", "Banned type DOMRefCell<JS<T>> detected. Use MutJS<T> instead", no_filter),
|
||||||
(r"DOMRefCell<Heap<.+>>", "Banned type DOMRefCell<Heap<T>> detected. Use MutJS<JS<T>> instead", no_filter),
|
(r"DOMRefCell<Heap<.+>>", "Banned type DOMRefCell<Heap<T>> detected. Use MutJS<T> instead", no_filter),
|
||||||
# No benefit to using &Root<T>
|
# No benefit to using &Root<T>
|
||||||
(r": &Root<", "use &T instead of &Root<T>", no_filter),
|
(r": &Root<", "use &T instead of &Root<T>", no_filter),
|
||||||
(r"^&&", "operators should go at the end of the first line", no_filter),
|
(r"^&&", "operators should go at the end of the first line", no_filter),
|
||||||
|
|
|
@ -13,7 +13,7 @@ use script::test::Node;
|
||||||
|
|
||||||
struct Foo {
|
struct Foo {
|
||||||
bar: DOMRefCell<JS<Node>>
|
bar: DOMRefCell<JS<Node>>
|
||||||
//~^ ERROR Banned type DOMRefCell<JS<T>> detected. Use MutJS<JS<T>> instead
|
//~^ ERROR Banned type DOMRefCell<JS<T>> detected. Use MutJS<T> instead
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
|
@ -151,7 +151,7 @@ class CheckTidiness(unittest.TestCase):
|
||||||
self.assertNoMoreErrors(ban_errors)
|
self.assertNoMoreErrors(ban_errors)
|
||||||
|
|
||||||
ban_errors = tidy.collect_errors_for_files(iterFile('ban-domrefcell.rs'), [], [tidy.check_rust], print_text=False)
|
ban_errors = tidy.collect_errors_for_files(iterFile('ban-domrefcell.rs'), [], [tidy.check_rust], print_text=False)
|
||||||
self.assertEqual('Banned type DOMRefCell<JS<T>> detected. Use MutJS<JS<T>> instead', ban_errors.next()[2])
|
self.assertEqual('Banned type DOMRefCell<JS<T>> detected. Use MutJS<T> instead', ban_errors.next()[2])
|
||||||
self.assertNoMoreErrors(ban_errors)
|
self.assertNoMoreErrors(ban_errors)
|
||||||
|
|
||||||
def test_spec_link(self):
|
def test_spec_link(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue