]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/issue-4252.rs
std: Rename Show/String to Debug/Display
[rust.git] / src / test / run-pass / issue-4252.rs
index 6ed35e6bc232f2611d8a5a8e91a4e8c1cc3e65d4..9d5f8576c633ee83a31c6bf78f33778135c4cf83 100644 (file)
 #![feature(unsafe_destructor)]
 
 trait X {
-    fn call<T: std::fmt::Show>(&self, x: &T);
-    fn default_method<T: std::fmt::Show>(&self, x: &T) {
-        println!("X::default_method {}", x);
+    fn call<T: std::fmt::Debug>(&self, x: &T);
+    fn default_method<T: std::fmt::Debug>(&self, x: &T) {
+        println!("X::default_method {:?}", x);
     }
 }
 
-#[derive(Show)]
+#[derive(Debug)]
 struct Y(int);
 
-#[derive(Show)]
+#[derive(Debug)]
 struct Z<T> {
     x: T
 }
 
 impl X for Y {
-    fn call<T: std::fmt::Show>(&self, x: &T) {
-        println!("X::call {} {}", self, x);
+    fn call<T: std::fmt::Debug>(&self, x: &T) {
+        println!("X::call {:?} {:?}", self, x);
     }
 }
 
 #[unsafe_destructor]
-impl<T: X + std::fmt::Show> Drop for Z<T> {
+impl<T: X + std::fmt::Debug> Drop for Z<T> {
     fn drop(&mut self) {
         // These statements used to cause an ICE.
         self.x.call(self);