mirror of
https://github.com/servo/servo.git
synced 2025-06-12 10:24:43 +00:00
Add a tidy check for problematic match cases in script_thread.rs
This commit is contained in:
parent
a74cbbeb1a
commit
14d8ae2478
4 changed files with 41 additions and 14 deletions
18
python/tidy/servo_tidy_tests/script_thread.rs
Normal file
18
python/tidy/servo_tidy_tests/script_thread.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
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() {
|
||||
=> {}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue