aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy
diff options
context:
space:
mode:
authorbors-servo <servo-ops@mozilla.com>2020-04-10 00:37:54 -0400
committerGitHub <noreply@github.com>2020-04-10 00:37:54 -0400
commit9fd668488e0986a36fe55f7fd023588993674ae6 (patch)
tree9447e161231c94f7740be0d7763242df6e7d7c4c /python/tidy
parent455a99ca8db4426c2f0f33b92846f0d8902a62b7 (diff)
parent1c0549ce7fd748511d6200e622eddf800b3e9ca4 (diff)
downloadservo-9fd668488e0986a36fe55f7fd023588993674ae6.tar.gz
servo-9fd668488e0986a36fe55f7fd023588993674ae6.zip
Auto merge of #26071 - servo:rustup, r=nox
Upgrade to rustc 1.44.0-nightly (42abbd887 2020-04-07) ~Blocked on https://github.com/rust-lang/rust/issues/70280~
Diffstat (limited to 'python/tidy')
-rw-r--r--python/tidy/servo_tidy/tidy.py3
-rw-r--r--python/tidy/servo_tidy_tests/script_thread.rs18
-rw-r--r--python/tidy/servo_tidy_tests/test_tidy.py6
3 files changed, 0 insertions, 27 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py
index cbbb1a542d4..cfeef216869 100644
--- a/python/tidy/servo_tidy/tidy.py
+++ b/python/tidy/servo_tidy/tidy.py
@@ -625,9 +625,6 @@ def check_rust(file_name, lines):
(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",
- lambda match, line: file_name.endswith('script_thread.rs')),
# -> () is unnecessary
(r"-> \(\)", "encountered function signature with -> ()", no_filter),
]
diff --git a/python/tidy/servo_tidy_tests/script_thread.rs b/python/tidy/servo_tidy_tests/script_thread.rs
deleted file mode 100644
index 5dbeaec0e17..00000000000
--- a/python/tidy/servo_tidy_tests/script_thread.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-fn main() {
- // This should trigger an error.
- match self.documents.borrow_mut() {
- _ => {}
- }
- // This should trigger an error.
- match self.documents.borrow() {
- _ => {}
- }
- // This should not trigger an error.
- match { self.documents.borrow().find_window(id) } {
- => {}
- }
- // This should not trigger an error.
- match self.documents_status.borrow() {
- => {}
- }
-}
diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py
index 441e9250c51..12f384b8674 100644
--- a/python/tidy/servo_tidy_tests/test_tidy.py
+++ b/python/tidy/servo_tidy_tests/test_tidy.py
@@ -140,12 +140,6 @@ class CheckTidiness(unittest.TestCase):
self.assertEqual('method declared in webidl is missing a comment with a specification link', next(errors)[2])
self.assertNoMoreErrors(errors)
- def test_script_thread(self):
- errors = tidy.collect_errors_for_files(iterFile('script_thread.rs'), [], [tidy.check_rust], print_text=False)
- self.assertEqual('use a separate variable for the match expression', next(errors)[2])
- self.assertEqual('use a separate variable for the match expression', next(errors)[2])
- self.assertNoMoreErrors(errors)
-
def test_webidl(self):
errors = tidy.collect_errors_for_files(iterFile('spec.webidl'), [tidy.check_webidl_spec], [], print_text=False)
self.assertEqual('No specification link found.', next(errors)[2])