diff options
Diffstat (limited to 'src/test')
31 files changed, 131 insertions, 131 deletions
diff --git a/src/test/compile-fail/dst-index.rs b/src/test/compile-fail/dst-index.rs index 2a66b87fece..876c98298dc 100644 --- a/src/test/compile-fail/dst-index.rs +++ b/src/test/compile-fail/dst-index.rs @@ -12,7 +12,7 @@ // can't be used as rvalues use std::ops::Index; -use std::fmt::Show; +use std::fmt::Debug; struct S; @@ -31,9 +31,9 @@ struct T; impl Copy for T {} impl Index<usize> for T { - type Output = Show + 'static; + type Output = Debug + 'static; - fn index<'a>(&'a self, idx: &usize) -> &'a (Show + 'static) { + fn index<'a>(&'a self, idx: &usize) -> &'a (Debug + 'static) { static x: usize = 42; &x } diff --git a/src/test/compile-fail/issue-14853.rs b/src/test/compile-fail/issue-14853.rs index 22ba54fea14..51deb99a4f2 100644 --- a/src/test/compile-fail/issue-14853.rs +++ b/src/test/compile-fail/issue-14853.rs @@ -8,12 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::fmt::Show; +use std::fmt::Debug; trait Str {} trait Something { - fn yay<T: Show>(_: Option<Self>, thing: &[T]); + fn yay<T: Debug>(_: Option<Self>, thing: &[T]); } struct X { data: u32 } diff --git a/src/test/compile-fail/issue-15094.rs b/src/test/compile-fail/issue-15094.rs index 5b33069b595..2c03a9e0733 100644 --- a/src/test/compile-fail/issue-15094.rs +++ b/src/test/compile-fail/issue-15094.rs @@ -12,19 +12,19 @@ use std::{fmt, ops}; -struct Shower<T> { +struct Debuger<T> { x: T } -impl<T: fmt::Show> ops::Fn<(), ()> for Shower<T> { +impl<T: fmt::Debug> ops::Fn<(), ()> for Debuger<T> { fn call(&self, _args: ()) { //~^ ERROR `call` has an incompatible type for trait: expected "rust-call" fn, found "Rust" fn println!("{:?}", self.x); } } -fn make_shower<T>(x: T) -> Shower<T> { - Shower { x: x } +fn make_shower<T>(x: T) -> Debuger<T> { + Debuger { x: x } } pub fn main() { diff --git a/src/test/compile-fail/liveness-use-after-send.rs b/src/test/compile-fail/liveness-use-after-send.rs index 4ba24800f5d..a49339ecd7f 100644 --- a/src/test/compile-fail/liveness-use-after-send.rs +++ b/src/test/compile-fail/liveness-use-after-send.rs @@ -8,13 +8,13 @@ // 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) { +fn send<T:Send + std::fmt::Debug>(ch: _chan<T>, data: T) { println!("{:?}", ch); println!("{:?}", data); panic!(); } -#[derive(Show)] +#[derive(Debug)] struct _chan<T>(isize); // Tests that "log(debug, message);" is flagged as using diff --git a/src/test/run-fail/assert-eq-macro-panic.rs b/src/test/run-fail/assert-eq-macro-panic.rs index 4b1a420cb78..69ed025070b 100644 --- a/src/test/run-fail/assert-eq-macro-panic.rs +++ b/src/test/run-fail/assert-eq-macro-panic.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// error-pattern:assertion failed: `(left == right) && (right == left)` (left: `14i`, right: `15i`) +// error-pattern:assertion failed: `(left == right) && (right == left)` (left: `14`, right: `15`) fn main() { assert_eq!(14i,15i); diff --git a/src/test/run-pass/cfg_attr.rs b/src/test/run-pass/cfg_attr.rs index 7e508d91c87..9bef7f70420 100644 --- a/src/test/run-pass/cfg_attr.rs +++ b/src/test/run-pass/cfg_attr.rs @@ -10,44 +10,44 @@ // compile-flags:--cfg set1 --cfg set2 #![allow(dead_code)] -use std::fmt::Show; +use std::fmt::Debug; -struct NotShowable; +struct NotDebugable; -#[cfg_attr(set1, derive(Show))] +#[cfg_attr(set1, derive(Debug))] struct Set1; -#[cfg_attr(notset, derive(Show))] -struct Notset(NotShowable); +#[cfg_attr(notset, derive(Debug))] +struct Notset(NotDebugable); -#[cfg_attr(not(notset), derive(Show))] +#[cfg_attr(not(notset), derive(Debug))] struct NotNotset; -#[cfg_attr(not(set1), derive(Show))] -struct NotSet1(NotShowable); +#[cfg_attr(not(set1), derive(Debug))] +struct NotSet1(NotDebugable); -#[cfg_attr(all(set1, set2), derive(Show))] +#[cfg_attr(all(set1, set2), derive(Debug))] struct AllSet1Set2; -#[cfg_attr(all(set1, notset), derive(Show))] -struct AllSet1Notset(NotShowable); +#[cfg_attr(all(set1, notset), derive(Debug))] +struct AllSet1Notset(NotDebugable); -#[cfg_attr(any(set1, notset), derive(Show))] +#[cfg_attr(any(set1, notset), derive(Debug))] struct AnySet1Notset; -#[cfg_attr(any(notset, notset2), derive(Show))] -struct AnyNotsetNotset2(NotShowable); +#[cfg_attr(any(notset, notset2), derive(Debug))] +struct AnyNotsetNotset2(NotDebugable); -#[cfg_attr(all(not(notset), any(set1, notset)), derive(Show))] +#[cfg_attr(all(not(notset), any(set1, notset)), derive(Debug))] struct Complex; -#[cfg_attr(any(notset, not(any(set1, notset))), derive(Show))] -struct ComplexNot(NotShowable); +#[cfg_attr(any(notset, not(any(set1, notset))), derive(Debug))] +struct ComplexNot(NotDebugable); -#[cfg_attr(any(target_endian = "little", target_endian = "big"), derive(Show))] +#[cfg_attr(any(target_endian = "little", target_endian = "big"), derive(Debug))] struct KeyValue; -fn is_show<T: Show>() {} +fn is_show<T: Debug>() {} fn main() { is_show::<Set1>(); diff --git a/src/test/run-pass/coerce-expect-unsized.rs b/src/test/run-pass/coerce-expect-unsized.rs index f590e6e0728..06849a2b973 100644 --- a/src/test/run-pass/coerce-expect-unsized.rs +++ b/src/test/run-pass/coerce-expect-unsized.rs @@ -11,7 +11,7 @@ #![allow(unknown_features)] #![feature(box_syntax)] -use std::fmt::Show; +use std::fmt::Debug; // Check that coercions apply at the pointer level and don't cause // rvalue expressions to be unsized. See #20169 for more information. @@ -21,15 +21,15 @@ pub fn main() { let _: Box<[int]> = box if true { [1, 2, 3] } else { [1, 3, 4] }; let _: Box<[int]> = box match true { true => [1, 2, 3], false => [1, 3, 4] }; let _: Box<Fn(int) -> _> = box { |x| (x as u8) }; - let _: Box<Show> = box if true { false } else { true }; - let _: Box<Show> = box match true { true => 'a', false => 'b' }; + let _: Box<Debug> = box if true { false } else { true }; + let _: Box<Debug> = box match true { true => 'a', false => 'b' }; let _: &[int] = &{ [1, 2, 3] }; let _: &[int] = &if true { [1, 2, 3] } else { [1, 3, 4] }; let _: &[int] = &match true { true => [1, 2, 3], false => [1, 3, 4] }; let _: &Fn(int) -> _ = &{ |x| (x as u8) }; - let _: &Show = &if true { false } else { true }; - let _: &Show = &match true { true => 'a', false => 'b' }; + let _: &Debug = &if true { false } else { true }; + let _: &Debug = &match true { true => 'a', false => 'b' }; let _: Box<[int]> = Box::new([1, 2, 3]); let _: Box<Fn(int) -> _> = Box::new(|x| (x as u8)); diff --git a/src/test/run-pass/coherence-where-clause.rs b/src/test/run-pass/coherence-where-clause.rs index 99c475b7207..78b603690fd 100644 --- a/src/test/run-pass/coherence-where-clause.rs +++ b/src/test/run-pass/coherence-where-clause.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::fmt::Show; +use std::fmt::Debug; use std::default::Default; trait MyTrait { @@ -23,7 +23,7 @@ impl<T> MyTrait for T } } -#[derive(Clone,Show,PartialEq)] +#[derive(Clone,Debug,PartialEq)] struct MyType { dummy: uint } @@ -35,7 +35,7 @@ impl MyTrait for MyType { } fn test_eq<M>(m: M, n: M) -where M : MyTrait + Show + PartialEq +where M : MyTrait + Debug + PartialEq { assert_eq!(m.get(), n); } diff --git a/src/test/run-pass/deriving-show-2.rs b/src/test/run-pass/deriving-show-2.rs index 8465f521e43..acd07bc98d3 100644 --- a/src/test/run-pass/deriving-show-2.rs +++ b/src/test/run-pass/deriving-show-2.rs @@ -10,39 +10,39 @@ use std::fmt; -#[derive(Show)] +#[derive(Debug)] enum A {} -#[derive(Show)] +#[derive(Debug)] enum B { B1, B2, B3 } -#[derive(Show)] +#[derive(Debug)] enum C { C1(int), C2(B), C3(String) } -#[derive(Show)] +#[derive(Debug)] enum D { D1{ a: int } } -#[derive(Show)] +#[derive(Debug)] struct E; -#[derive(Show)] +#[derive(Debug)] struct F(int); -#[derive(Show)] +#[derive(Debug)] struct G(int, int); -#[derive(Show)] +#[derive(Debug)] struct H { a: int } -#[derive(Show)] +#[derive(Debug)] struct I { a: int, b: int } -#[derive(Show)] +#[derive(Debug)] struct J(Custom); struct Custom; -impl fmt::Show for Custom { +impl fmt::Debug for Custom { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "yay") } } -trait ToShow { +trait ToDebug { fn to_show(&self) -> String; } -impl<T: fmt::Show> ToShow for T { +impl<T: fmt::Debug> ToDebug for T { fn to_show(&self) -> String { format!("{:?}", self) } @@ -51,12 +51,12 @@ impl<T: fmt::Show> ToShow for T { pub fn main() { assert_eq!(B::B1.to_show(), "B1".to_string()); assert_eq!(B::B2.to_show(), "B2".to_string()); - assert_eq!(C::C1(3).to_show(), "C1(3i)".to_string()); + assert_eq!(C::C1(3).to_show(), "C1(3)".to_string()); assert_eq!(C::C2(B::B2).to_show(), "C2(B2)".to_string()); - assert_eq!(D::D1{ a: 2 }.to_show(), "D1 { a: 2i }".to_string()); + assert_eq!(D::D1{ a: 2 }.to_show(), "D1 { a: 2 }".to_string()); assert_eq!(E.to_show(), "E".to_string()); - assert_eq!(F(3).to_show(), "F(3i)".to_string()); - assert_eq!(G(3, 4).to_show(), "G(3i, 4i)".to_string()); - assert_eq!(I{ a: 2, b: 4 }.to_show(), "I { a: 2i, b: 4i }".to_string()); + assert_eq!(F(3).to_show(), "F(3)".to_string()); + assert_eq!(G(3, 4).to_show(), "G(3, 4)".to_string()); + assert_eq!(I{ a: 2, b: 4 }.to_show(), "I { a: 2, b: 4 }".to_string()); assert_eq!(J(Custom).to_show(), "J(yay)".to_string()); } diff --git a/src/test/run-pass/deriving-show.rs b/src/test/run-pass/deriving-show.rs index 99c73dd94a6..7986b97685f 100644 --- a/src/test/run-pass/deriving-show.rs +++ b/src/test/run-pass/deriving-show.rs @@ -8,16 +8,16 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(Show)] +#[derive(Debug)] struct Unit; -#[derive(Show)] +#[derive(Debug)] struct Tuple(int, uint); -#[derive(Show)] +#[derive(Debug)] struct Struct { x: int, y: uint } -#[derive(Show)] +#[derive(Debug)] enum Enum { Nullary, Variant(int, uint), @@ -32,9 +32,9 @@ macro_rules! t { pub fn main() { t!(Unit, "Unit"); - t!(Tuple(1, 2), "Tuple(1i, 2u)"); - t!(Struct { x: 1, y: 2 }, "Struct { x: 1i, y: 2u }"); + t!(Tuple(1, 2), "Tuple(1, 2)"); + t!(Struct { x: 1, y: 2 }, "Struct { x: 1, y: 2 }"); t!(Enum::Nullary, "Nullary"); - t!(Enum::Variant(1, 2), "Variant(1i, 2u)"); - t!(Enum::StructVariant { x: 1, y: 2 }, "StructVariant { x: 1i, y: 2u }"); + t!(Enum::Variant(1, 2), "Variant(1, 2)"); + t!(Enum::StructVariant { x: 1, y: 2 }, "StructVariant { x: 1, y: 2 }"); } diff --git a/src/test/run-pass/dst-index.rs b/src/test/run-pass/dst-index.rs index dfb28fc9344..0c7ecfcefff 100644 --- a/src/test/run-pass/dst-index.rs +++ b/src/test/run-pass/dst-index.rs @@ -12,7 +12,7 @@ // work and don't ICE. use std::ops::Index; -use std::fmt::Show; +use std::fmt::Debug; struct S; @@ -27,16 +27,16 @@ impl Index<uint> for S { struct T; impl Index<uint> for T { - type Output = Show + 'static; + type Output = Debug + 'static; - fn index<'a>(&'a self, idx: &uint) -> &'a (Show + 'static) { + fn index<'a>(&'a self, idx: &uint) -> &'a (Debug + 'static) { static X: uint = 42; - &X as &(Show + 'static) + &X as &(Debug + 'static) } } fn main() { assert_eq!(&S[0], "hello"); &T[0]; - // let x = &x as &Show; + // let x = &x as &Debug; } diff --git a/src/test/run-pass/ifmt.rs b/src/test/run-pass/ifmt.rs index c22fb811a7b..e273baef256 100644 --- a/src/test/run-pass/ifmt.rs +++ b/src/test/run-pass/ifmt.rs @@ -33,7 +33,7 @@ impl fmt::UpperHex for B { f.write_str("adios") } } -impl fmt::String for C { +impl fmt::Display for C { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.pad_integral(true, "☃", "123") } @@ -63,8 +63,8 @@ pub fn main() { t!(format!("{}", 10i), "10"); t!(format!("{}", 10u), "10"); t!(format!("{:?}", '☃'), "'\\u{2603}'"); - t!(format!("{:?}", 10i), "10i"); - t!(format!("{:?}", 10u), "10u"); + t!(format!("{:?}", 10i), "10"); + t!(format!("{:?}", 10u), "10"); t!(format!("{:?}", "true"), "\"true\""); t!(format!("{:?}", "foo\nbar"), "\"foo\\nbar\""); t!(format!("{:o}", 10u), "12"); @@ -72,22 +72,22 @@ pub fn main() { t!(format!("{:X}", 10u), "A"); t!(format!("{}", "foo"), "foo"); t!(format!("{}", "foo".to_string()), "foo"); - t!(format!("{:p}", 0x1234 as *const int), "0x1234"); - t!(format!("{:p}", 0x1234 as *mut int), "0x1234"); + t!(format!("{:p}", 0x1234 as *const isize), "0x1234"); + t!(format!("{:p}", 0x1234 as *mut isize), "0x1234"); t!(format!("{:x}", A), "aloha"); t!(format!("{:X}", B), "adios"); t!(format!("foo {} ☃☃☃☃☃☃", "bar"), "foo bar ☃☃☃☃☃☃"); t!(format!("{1} {0}", 0i, 1i), "1 0"); - t!(format!("{foo} {bar}", foo=0i, bar=1i), "0 1"); - t!(format!("{foo} {1} {bar} {0}", 0i, 1i, foo=2i, bar=3i), "2 1 3 0"); + t!(format!("{foo} {bar}", foo=0i, bar=1is), "0 1"); + t!(format!("{foo} {1} {bar} {0}", 0is, 1is, foo=2is, bar=3is), "2 1 3 0"); t!(format!("{} {0}", "a"), "a a"); t!(format!("{foo_bar}", foo_bar=1i), "1"); t!(format!("{}", 5i + 5i), "10"); t!(format!("{:#4}", C), "☃123"); // FIXME(#20676) - // let a: &fmt::Show = &1i; - // t!(format!("{:?}", a), "1i"); + // let a: &fmt::Debug = &1i; + // t!(format!("{:?}", a), "1"); // Formatting strings and their arguments @@ -154,7 +154,7 @@ pub fn main() { // make sure that format! doesn't cause spurious unused-unsafe warnings when // it's inside of an outer unsafe block unsafe { - let a: int = ::std::mem::transmute(3u); + let a: isize = ::std::mem::transmute(3u); format!("{}", a); } @@ -215,8 +215,8 @@ fn test_format_args() { fn test_order() { // Make sure format!() arguments are always evaluated in a left-to-right // ordering - fn foo() -> int { - static mut FOO: int = 0; + fn foo() -> isize { + static mut FOO: isize = 0; unsafe { FOO += 1; FOO diff --git a/src/test/run-pass/issue-20676.rs b/src/test/run-pass/issue-20676.rs index fd99fc01a23..01a2322ae93 100644 --- a/src/test/run-pass/issue-20676.rs +++ b/src/test/run-pass/issue-20676.rs @@ -15,6 +15,6 @@ use std::fmt; fn main() { - let a: &fmt::Show = &1_i32; + let a: &fmt::Debug = &1_i32; format!("{:?}", a); } diff --git a/src/test/run-pass/issue-3559.rs b/src/test/run-pass/issue-3559.rs index 633832f424c..0118fce4ec3 100644 --- a/src/test/run-pass/issue-3559.rs +++ b/src/test/run-pass/issue-3559.rs @@ -24,6 +24,6 @@ pub fn main() { let mut table = HashMap::new(); table.insert("one".to_string(), 1i); table.insert("two".to_string(), 2i); - assert!(check_strs(format!("{:?}", table).as_slice(), "HashMap {\"one\": 1i, \"two\": 2i}") || - check_strs(format!("{:?}", table).as_slice(), "HashMap {\"two\": 2i, \"one\": 1i}")); + assert!(check_strs(format!("{:?}", table).as_slice(), "HashMap {\"one\": 1, \"two\": 2}") || + check_strs(format!("{:?}", table).as_slice(), "HashMap {\"two\": 2, \"one\": 1}")); } diff --git a/src/test/run-pass/issue-4252.rs b/src/test/run-pass/issue-4252.rs index 3606aff05ff..9d5f8576c63 100644 --- a/src/test/run-pass/issue-4252.rs +++ b/src/test/run-pass/issue-4252.rs @@ -11,28 +11,28 @@ #![feature(unsafe_destructor)] trait X { - fn call<T: std::fmt::Show>(&self, x: &T); - fn default_method<T: std::fmt::Show>(&self, x: &T) { + 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) { + 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); diff --git a/src/test/run-pass/issue-8898.rs b/src/test/run-pass/issue-8898.rs index f845db9c421..379b8f7700e 100644 --- a/src/test/run-pass/issue-8898.rs +++ b/src/test/run-pass/issue-8898.rs @@ -8,17 +8,17 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -fn assert_repr_eq<T: std::fmt::Show>(obj : T, expected : String) { +fn assert_repr_eq<T: std::fmt::Debug>(obj : T, expected : String) { assert_eq!(expected, format!("{:?}", obj)); } pub fn main() { - let abc = [1i, 2, 3]; + let abc = [1, 2, 3]; let tf = [true, false]; let x = [(), ()]; let slice = &x[..1]; - assert_repr_eq(&abc[], "[1i, 2i, 3i]".to_string()); + assert_repr_eq(&abc[], "[1, 2, 3]".to_string()); assert_repr_eq(&tf[], "[true, false]".to_string()); assert_repr_eq(&x[], "[(), ()]".to_string()); assert_repr_eq(slice, "[()]".to_string()); diff --git a/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs b/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs index 7fb2390b84b..c4b45ae0f0e 100644 --- a/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs +++ b/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs @@ -8,19 +8,19 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(Clone, Show)] +#[derive(Clone, Debug)] enum foo { a(uint), b(String), } -fn check_log<T: std::fmt::Show>(exp: String, v: T) { +fn check_log<T: std::fmt::Debug>(exp: String, v: T) { assert_eq!(exp, format!("{:?}", v)); } pub fn main() { - let mut x = Some(foo::a(22u)); - let exp = "Some(a(22u))".to_string(); + let mut x = Some(foo::a(22)); + let exp = "Some(a(22))".to_string(); let act = format!("{:?}", x); assert_eq!(act, exp); check_log(exp, x); diff --git a/src/test/run-pass/log-knows-the-names-of-variants.rs b/src/test/run-pass/log-knows-the-names-of-variants.rs index 45fd2098dc4..e8852377957 100644 --- a/src/test/run-pass/log-knows-the-names-of-variants.rs +++ b/src/test/run-pass/log-knows-the-names-of-variants.rs @@ -8,20 +8,20 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(Show)] +#[derive(Debug)] enum foo { - a(uint), + a(usize), b(String), c, } -#[derive(Show)] +#[derive(Debug)] enum bar { d, e, f } pub fn main() { - assert_eq!("a(22u)".to_string(), format!("{:?}", foo::a(22u))); + assert_eq!("a(22)".to_string(), format!("{:?}", foo::a(22))); assert_eq!("c".to_string(), format!("{:?}", foo::c)); assert_eq!("d".to_string(), format!("{:?}", bar::d)); } diff --git a/src/test/run-pass/multidispatch1.rs b/src/test/run-pass/multidispatch1.rs index 87d188418bd..15df67e1488 100644 --- a/src/test/run-pass/multidispatch1.rs +++ b/src/test/run-pass/multidispatch1.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::fmt::Show; +use std::fmt::Debug; trait MyTrait<T> { fn get(&self) -> T; @@ -29,7 +29,7 @@ impl MyTrait<u8> for MyType { } fn test_eq<T,M>(m: M, v: T) -where T : Eq + Show, +where T : Eq + Debug, M : MyTrait<T> { assert_eq!(m.get(), v); diff --git a/src/test/run-pass/multidispatch2.rs b/src/test/run-pass/multidispatch2.rs index 1aa15cc5983..0c2652e6a7c 100644 --- a/src/test/run-pass/multidispatch2.rs +++ b/src/test/run-pass/multidispatch2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::fmt::Show; +use std::fmt::Debug; use std::default::Default; trait MyTrait<T> { @@ -34,7 +34,7 @@ impl MyTrait<uint> for MyType { } fn test_eq<T,M>(m: M, v: T) -where T : Eq + Show, +where T : Eq + Debug, M : MyTrait<T> { assert_eq!(m.get(), v); diff --git a/src/test/run-pass/no-landing-pads.rs b/src/test/run-pass/no-landing-pads.rs index 64e78c3483b..c90c6ce87f0 100644 --- a/src/test/run-pass/no-landing-pads.rs +++ b/src/test/run-pass/no-landing-pads.rs @@ -26,6 +26,6 @@ fn main() { Thread::scoped(move|| -> () { let _a = A; panic!(); - }).join().unwrap_err(); + }).join().err().unwrap(); assert!(unsafe { !HIT }); } diff --git a/src/test/run-pass/overloaded-index-assoc-list.rs b/src/test/run-pass/overloaded-index-assoc-list.rs index 2e044227eb1..5e0523d7041 100644 --- a/src/test/run-pass/overloaded-index-assoc-list.rs +++ b/src/test/run-pass/overloaded-index-assoc-list.rs @@ -28,7 +28,7 @@ impl<K,V> AssociationList<K,V> { } } -impl<K: PartialEq + std::fmt::Show, V:Clone> Index<K> for AssociationList<K,V> { +impl<K: PartialEq + std::fmt::Debug, V:Clone> Index<K> for AssociationList<K,V> { type Output = V; fn index<'a>(&'a self, index: &K) -> &'a V { diff --git a/src/test/run-pass/rec-align-u32.rs b/src/test/run-pass/rec-align-u32.rs index 5b91d5e930f..05643b0b56b 100644 --- a/src/test/run-pass/rec-align-u32.rs +++ b/src/test/run-pass/rec-align-u32.rs @@ -22,14 +22,14 @@ mod rusti { } // This is the type with the questionable alignment -#[derive(Show)] +#[derive(Debug)] struct Inner { c64: u32 } // This is the type that contains the type with the // questionable alignment, for testing -#[derive(Show)] +#[derive(Debug)] struct Outer { c8: u8, t: Inner @@ -66,6 +66,6 @@ pub fn main() { // because `inner`s alignment was 4. assert_eq!(mem::size_of::<Outer>(), m::size()); - assert_eq!(y, "Outer { c8: 22u8, t: Inner { c64: 44u32 } }".to_string()); + assert_eq!(y, "Outer { c8: 22, t: Inner { c64: 44 } }".to_string()); } } diff --git a/src/test/run-pass/rec-align-u64.rs b/src/test/run-pass/rec-align-u64.rs index 27941542d00..eaf76ef5714 100644 --- a/src/test/run-pass/rec-align-u64.rs +++ b/src/test/run-pass/rec-align-u64.rs @@ -22,14 +22,14 @@ mod rusti { } // This is the type with the questionable alignment -#[derive(Show)] +#[derive(Debug)] struct Inner { c64: u64 } // This is the type that contains the type with the // questionable alignment, for testing -#[derive(Show)] +#[derive(Debug)] struct Outer { c8: u8, t: Inner @@ -95,6 +95,6 @@ pub fn main() { // because `Inner`s alignment was 4. assert_eq!(mem::size_of::<Outer>(), m::m::size()); - assert_eq!(y, "Outer { c8: 22u8, t: Inner { c64: 44u64 } }".to_string()); + assert_eq!(y, "Outer { c8: 22, t: Inner { c64: 44 } }".to_string()); } } diff --git a/src/test/run-pass/sepcomp-unwind.rs b/src/test/run-pass/sepcomp-unwind.rs index b8bb3b4e7f8..f68dea04a08 100644 --- a/src/test/run-pass/sepcomp-unwind.rs +++ b/src/test/run-pass/sepcomp-unwind.rs @@ -36,5 +36,5 @@ mod b { } fn main() { - Thread::scoped(move|| { ::b::g() }).join().unwrap_err(); + Thread::scoped(move|| { ::b::g() }).join().err().unwrap(); } diff --git a/src/test/run-pass/show-boxed-slice.rs b/src/test/run-pass/show-boxed-slice.rs index fc0b501e9c5..f496765edca 100644 --- a/src/test/run-pass/show-boxed-slice.rs +++ b/src/test/run-pass/show-boxed-slice.rs @@ -11,7 +11,7 @@ #![allow(unknown_features)] #![feature(box_syntax)] -#[derive(Show)] +#[derive(Debug)] struct Foo(Box<[u8]>); pub fn main() { diff --git a/src/test/run-pass/small-enums-with-fields.rs b/src/test/run-pass/small-enums-with-fields.rs index c793deaae2b..fc45e107bb0 100644 --- a/src/test/run-pass/small-enums-with-fields.rs +++ b/src/test/run-pass/small-enums-with-fields.rs @@ -10,7 +10,7 @@ use std::mem::size_of; -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] enum Either<T, U> { Left(T), Right(U) } macro_rules! check { @@ -29,14 +29,14 @@ macro_rules! check { pub fn main() { check!(Option<u8>, 2, None, "None", - Some(129u8), "Some(129u8)"); + Some(129u8), "Some(129)"); check!(Option<i16>, 4, None, "None", - Some(-20000i16), "Some(-20000i16)"); + Some(-20000i16), "Some(-20000)"); check!(Either<u8, i8>, 2, - Either::Left(132u8), "Left(132u8)", - Either::Right(-32i8), "Right(-32i8)"); + Either::Left(132u8), "Left(132)", + Either::Right(-32i8), "Right(-32)"); check!(Either<u8, i16>, 4, - Either::Left(132u8), "Left(132u8)", - Either::Right(-20000i16), "Right(-20000i16)"); + Either::Left(132u8), "Left(132)", + Either::Right(-20000i16), "Right(-20000)"); } diff --git a/src/test/run-pass/tag-align-shape.rs b/src/test/run-pass/tag-align-shape.rs index b88357252d8..cc0a75181db 100644 --- a/src/test/run-pass/tag-align-shape.rs +++ b/src/test/run-pass/tag-align-shape.rs @@ -8,12 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(Show)] +#[derive(Debug)] enum a_tag { a_tag_var(u64) } -#[derive(Show)] +#[derive(Debug)] struct t_rec { c8: u8, t: a_tag @@ -23,5 +23,5 @@ pub fn main() { let x = t_rec {c8: 22u8, t: a_tag::a_tag_var(44u64)}; let y = format!("{:?}", x); println!("y = {:?}", y); - assert_eq!(y, "t_rec { c8: 22u8, t: a_tag_var(44u64) }".to_string()); + assert_eq!(y, "t_rec { c8: 22, t: a_tag_var(44) }".to_string()); } diff --git a/src/test/run-pass/unit-like-struct-drop-run.rs b/src/test/run-pass/unit-like-struct-drop-run.rs index 4c866503282..3c50712b464 100644 --- a/src/test/run-pass/unit-like-struct-drop-run.rs +++ b/src/test/run-pass/unit-like-struct-drop-run.rs @@ -26,6 +26,6 @@ pub fn main() { let _b = Foo; }).join(); - let s = x.unwrap_err().downcast::<&'static str>().unwrap(); + let s = x.err().unwrap().downcast::<&'static str>().ok().unwrap(); assert_eq!(s.as_slice(), "This panic should happen."); } diff --git a/src/test/run-pass/vec-to_str.rs b/src/test/run-pass/vec-to_str.rs index 97c12d0954e..31f26126242 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!(format!("{:?}", vec!(0i, 1)), "[0i, 1i]".to_string()); + assert_eq!(format!("{:?}", vec!(0i, 1)), "[0, 1]".to_string()); let foo = vec!(3i, 4); let bar: &[int] = &[4, 5]; - assert_eq!(format!("{:?}", foo), "[3i, 4i]"); - assert_eq!(format!("{:?}", bar), "[4i, 5i]"); + assert_eq!(format!("{:?}", foo), "[3, 4]"); + assert_eq!(format!("{:?}", bar), "[4, 5]"); } diff --git a/src/test/run-pass/wait-forked-but-failed-child.rs b/src/test/run-pass/wait-forked-but-failed-child.rs index eb7205b5e0a..ffeb4be349a 100644 --- a/src/test/run-pass/wait-forked-but-failed-child.rs +++ b/src/test/run-pass/wait-forked-but-failed-child.rs @@ -58,7 +58,7 @@ fn main() { let _failures = range(0, 100).map(|_| { let cmd = Command::new(too_long.as_slice()); let failed = cmd.spawn(); - assert!(failed.is_err(), "Make sure the command fails to spawn(): {}", cmd); + assert!(failed.is_err(), "Make sure the command fails to spawn(): {:?}", cmd); failed }).collect::<Vec<_>>(); |
