]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/liveness-use-after-send.rs
std: Rename Show/String to Debug/Display
[rust.git] / src / test / compile-fail / liveness-use-after-send.rs
index f25d2a9b00c706596f12e46226c2efbee47c1614..a49339ecd7f2811e169e2316856af749a233b84c 100644 (file)
@@ -8,18 +8,18 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn send<T:Send + std::fmt::Show>(ch: _chan<T>, data: T) {
-    println!("{}", ch);
-    println!("{}", data);
+fn send<T:Send + std::fmt::Debug>(ch: _chan<T>, data: T) {
+    println!("{:?}", ch);
+    println!("{:?}", data);
     panic!();
 }
 
-#[derive(Show)]
-struct _chan<T>(int);
+#[derive(Debug)]
+struct _chan<T>(isize);
 
 // Tests that "log(debug, message);" is flagged as using
 // message after the send deinitializes it
-fn test00_start(ch: _chan<Box<int>>, message: Box<int>, _count: Box<int>) {
+fn test00_start(ch: _chan<Box<isize>>, message: Box<isize>, _count: Box<isize>) {
     send(ch, message);
     println!("{}", message); //~ ERROR use of moved value: `message`
 }