Add a tidy check for problematic match cases in script_thread.rs

This commit is contained in:
Josh Matthews 2016-12-16 11:36:47 -05:00
parent a74cbbeb1a
commit 14d8ae2478
4 changed files with 41 additions and 14 deletions

View 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() {
=> {}
}
}