about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-07 17:18:59 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-07 17:18:59 -0800
commita204dc56c97f35632575b1baa008f2e069b1bed9 (patch)
treeb55c302f46d0adb457d3ce2f250bc0b1209d0996 /src/test
parenta6bf7676a545f72cef2e3d042b6d0409f295693a (diff)
parent9851b4fbbf327bb1baab3182ce92970d4db22c6c (diff)
downloadrust-a204dc56c97f35632575b1baa008f2e069b1bed9.tar.gz
rust-a204dc56c97f35632575b1baa008f2e069b1bed9.zip
rollup merge of #20722: alexcrichton/audit-show
Conflicts:
	src/libcollections/vec.rs
	src/libcore/fmt/mod.rs
	src/librustdoc/html/format.rs
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs2
-rw-r--r--src/test/compile-fail/drop-with-active-borrows-2.rs2
-rw-r--r--src/test/compile-fail/no-capture-arc.rs2
-rw-r--r--src/test/compile-fail/no-reuse-move-arc.rs2
-rw-r--r--src/test/compile-fail/packed-struct-generic-transmute.rs2
-rw-r--r--src/test/run-pass/evec-slice.rs8
-rw-r--r--src/test/run-pass/ifmt.rs2
-rw-r--r--src/test/run-pass/issue-17503.rs6
-rw-r--r--src/test/run-pass/issue-5688.rs2
-rw-r--r--src/test/run-pass/repeated-vector-syntax.rs4
-rw-r--r--src/test/run-pass/vec-to_str.rs6
11 files changed, 19 insertions, 19 deletions
diff --git a/src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs b/src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs
index 10c63965a7b..d983c5d5087 100644
--- a/src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs
+++ b/src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs
@@ -18,7 +18,7 @@ struct defer<'a> {
 impl<'a> Drop for defer<'a> {
     fn drop(&mut self) {
         unsafe {
-            println!("{}", self.x);
+            println!("{:?}", self.x);
         }
     }
 }
diff --git a/src/test/compile-fail/drop-with-active-borrows-2.rs b/src/test/compile-fail/drop-with-active-borrows-2.rs
index 1cbd6292e99..d9d3d79b5af 100644
--- a/src/test/compile-fail/drop-with-active-borrows-2.rs
+++ b/src/test/compile-fail/drop-with-active-borrows-2.rs
@@ -15,5 +15,5 @@ fn read_lines_borrowed<'a>() -> Vec<&'a str> {
 }
 
 fn main() {
-    println!("{}", read_lines_borrowed());
+    println!("{:?}", read_lines_borrowed());
 }
diff --git a/src/test/compile-fail/no-capture-arc.rs b/src/test/compile-fail/no-capture-arc.rs
index 9a09448ff01..3d4d0fee0bf 100644
--- a/src/test/compile-fail/no-capture-arc.rs
+++ b/src/test/compile-fail/no-capture-arc.rs
@@ -23,5 +23,5 @@ fn main() {
 
     assert_eq!((*arc_v)[2], 3);
 
-    println!("{}", *arc_v);
+    println!("{:?}", *arc_v);
 }
diff --git a/src/test/compile-fail/no-reuse-move-arc.rs b/src/test/compile-fail/no-reuse-move-arc.rs
index de230743685..02028fe62e5 100644
--- a/src/test/compile-fail/no-reuse-move-arc.rs
+++ b/src/test/compile-fail/no-reuse-move-arc.rs
@@ -21,5 +21,5 @@ fn main() {
 
     assert_eq!((*arc_v)[2], 3); //~ ERROR use of moved value: `arc_v`
 
-    println!("{}", *arc_v); //~ ERROR use of moved value: `arc_v`
+    println!("{:?}", *arc_v); //~ ERROR use of moved value: `arc_v`
 }
diff --git a/src/test/compile-fail/packed-struct-generic-transmute.rs b/src/test/compile-fail/packed-struct-generic-transmute.rs
index 38177d07645..70c9d835161 100644
--- a/src/test/compile-fail/packed-struct-generic-transmute.rs
+++ b/src/test/compile-fail/packed-struct-generic-transmute.rs
@@ -34,6 +34,6 @@ fn main() {
     let foo = Foo { bar: [1u8, 2, 3, 4, 5], baz: 10i32 };
     unsafe {
         let oof: Oof<[u8; 5], i32> = mem::transmute(foo);
-        println!("{} {}", &oof.rab[], oof.zab);
+        println!("{:?} {:?}", &oof.rab[], oof.zab);
     }
 }
diff --git a/src/test/run-pass/evec-slice.rs b/src/test/run-pass/evec-slice.rs
index ab6576b9b42..734ac306653 100644
--- a/src/test/run-pass/evec-slice.rs
+++ b/src/test/run-pass/evec-slice.rs
@@ -22,7 +22,7 @@ pub fn main() {
     let c : &[int] = &[2,2,2,2,3];
     let cc : &[int] = &[2,2,2,2,2,2];
 
-    println!("{}", a);
+    println!("{:?}", a);
 
     assert!(a < b);
     assert!(a <= b);
@@ -30,7 +30,7 @@ pub fn main() {
     assert!(b >= a);
     assert!(b > a);
 
-    println!("{}", b);
+    println!("{:?}", b);
 
     assert!(b < c);
     assert!(b <= c);
@@ -44,7 +44,7 @@ pub fn main() {
     assert!(c >= a);
     assert!(c > a);
 
-    println!("{}", c);
+    println!("{:?}", c);
 
     assert!(a < cc);
     assert!(a <= cc);
@@ -52,5 +52,5 @@ pub fn main() {
     assert!(cc >= a);
     assert!(cc > a);
 
-    println!("{}", cc);
+    println!("{:?}", cc);
 }
diff --git a/src/test/run-pass/ifmt.rs b/src/test/run-pass/ifmt.rs
index 8b0d7c18fb1..c8d1080372b 100644
--- a/src/test/run-pass/ifmt.rs
+++ b/src/test/run-pass/ifmt.rs
@@ -183,7 +183,7 @@ fn test_write() {
 // can do with them just yet (to test the output)
 fn test_print() {
     print!("hi");
-    print!("{}", vec!(0u8));
+    print!("{:?}", vec!(0u8));
     println!("hello");
     println!("this is a {}", "test");
     println!("{foo}", foo="bar");
diff --git a/src/test/run-pass/issue-17503.rs b/src/test/run-pass/issue-17503.rs
index 8acda175006..fadc96f70ba 100644
--- a/src/test/run-pass/issue-17503.rs
+++ b/src/test/run-pass/issue-17503.rs
@@ -15,7 +15,7 @@ fn main() {
     let ss: &&[int] = &s;
     let sss: &&&[int] = &ss;
 
-    println!("{}", &s[0..3]);
-    println!("{}", &ss[3..]);
-    println!("{}", &sss[2..4]);
+    println!("{:?}", &s[0..3]);
+    println!("{:?}", &ss[3..]);
+    println!("{:?}", &sss[2..4]);
 }
diff --git a/src/test/run-pass/issue-5688.rs b/src/test/run-pass/issue-5688.rs
index 7c8940aafbf..cfe9c8f994c 100644
--- a/src/test/run-pass/issue-5688.rs
+++ b/src/test/run-pass/issue-5688.rs
@@ -25,6 +25,6 @@ static V: &'static [X] = &[X { vec: &[1, 2, 3] }];
 
 pub fn main() {
     for &v in V.iter() {
-        println!("{}", v.vec);
+        println!("{:?}", v.vec);
     }
 }
diff --git a/src/test/run-pass/repeated-vector-syntax.rs b/src/test/run-pass/repeated-vector-syntax.rs
index e854a732632..b8cfccad081 100644
--- a/src/test/run-pass/repeated-vector-syntax.rs
+++ b/src/test/run-pass/repeated-vector-syntax.rs
@@ -16,8 +16,8 @@ pub fn main() {
 
     print!("[");
     for xi in x.iter() {
-        print!("{}, ", &xi[]);
+        print!("{:?}, ", &xi[]);
     }
     println!("]");
-    println!("{}", &y[]);
+    println!("{:?}", &y[]);
 }
diff --git a/src/test/run-pass/vec-to_str.rs b/src/test/run-pass/vec-to_str.rs
index 52e0ba89479..97c12d0954e 100644
--- a/src/test/run-pass/vec-to_str.rs
+++ b/src/test/run-pass/vec-to_str.rs
@@ -9,11 +9,11 @@
 // except according to those terms.
 
 pub fn main() {
-    assert_eq!((vec!(0i, 1)).to_string(), "[0, 1]".to_string());
+    assert_eq!(format!("{:?}", vec!(0i, 1)), "[0i, 1i]".to_string());
 
     let foo = vec!(3i, 4);
     let bar: &[int] = &[4, 5];
 
-    assert_eq!(foo.to_string(), "[3, 4]".to_string());
-    assert_eq!(bar.to_string(), "[4, 5]".to_string());
+    assert_eq!(format!("{:?}", foo), "[3i, 4i]");
+    assert_eq!(format!("{:?}", bar), "[4i, 5i]");
 }