about summary refs log tree commit diff
path: root/src/test/compile-fail/bind-by-move-no-guards.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/compile-fail/bind-by-move-no-guards.rs')
-rw-r--r--src/test/compile-fail/bind-by-move-no-guards.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/compile-fail/bind-by-move-no-guards.rs b/src/test/compile-fail/bind-by-move-no-guards.rs
index 90d5072f412..bb6060f2543 100644
--- a/src/test/compile-fail/bind-by-move-no-guards.rs
+++ b/src/test/compile-fail/bind-by-move-no-guards.rs
@@ -8,15 +8,16 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::comm::channel;
+use std::sync::mpsc::channel;
 
 fn main() {
     let (tx, rx) = channel();
     let x = Some(rx);
     tx.send(false);
     match x {
-        Some(z) if z.recv() => { panic!() }, //~ ERROR cannot bind by-move into a pattern guard
-        Some(z) => { assert!(!z.recv()); },
+        Some(z) if z.recv().unwrap() => { panic!() },
+            //~^ ERROR cannot bind by-move into a pattern guard
+        Some(z) => { assert!(!z.recv().unwrap()); },
         None => panic!()
     }
 }