mirror of
https://github.com/servo/servo.git
synced 2025-07-29 02:00:23 +01:00
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~
This commit is contained in:
commit
9fd668488e
13 changed files with 40 additions and 56 deletions
|
@ -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),
|
||||
]
|
||||
|
|
|
@ -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() {
|
||||
=> {}
|
||||
}
|
||||
}
|
|
@ -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])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue