rollup merge of #20722: alexcrichton/audit-show
Conflicts: src/libcollections/vec.rs src/libcore/fmt/mod.rs src/librustdoc/html/format.rs
This commit is contained in:
commit
a204dc56c9
22 changed files with 76 additions and 78 deletions
|
|
@ -18,7 +18,7 @@ struct defer<'a> {
|
|||
impl<'a> Drop for defer<'a> {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
println!("{}", self.x);
|
||||
println!("{:?}", self.x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,5 +15,5 @@ fn read_lines_borrowed<'a>() -> Vec<&'a str> {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
println!("{}", read_lines_borrowed());
|
||||
println!("{:?}", read_lines_borrowed());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,5 +23,5 @@ fn main() {
|
|||
|
||||
assert_eq!((*arc_v)[2], 3);
|
||||
|
||||
println!("{}", *arc_v);
|
||||
println!("{:?}", *arc_v);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ pub fn main() {
|
|||
|
||||
print!("[");
|
||||
for xi in x.iter() {
|
||||
print!("{}, ", &xi[]);
|
||||
print!("{:?}, ", &xi[]);
|
||||
}
|
||||
println!("]");
|
||||
println!("{}", &y[]);
|
||||
println!("{:?}", &y[]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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]");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue