Follow rust std: fmt::Show was renamed to fmt::Debug

This commit is contained in:
Thomas Bahn 2015-02-06 15:21:51 +01:00
parent 5dd077969c
commit 9a284ae7c2
19 changed files with 77 additions and 77 deletions

View File

@ -17,7 +17,7 @@ use Animal::{Dog, Frog};
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#[derive(Clone, PartialEq, Show, RustcDecodable)] #[derive(Clone, PartialEq, Debug, RustcDecodable)]
#[derive_deserialize] #[derive_deserialize]
enum Animal { enum Animal {
Dog, Dog,
@ -26,7 +26,7 @@ enum Animal {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#[derive(Show)] #[derive(Debug)]
pub enum Error { pub enum Error {
EndOfStream, EndOfStream,
SyntaxError, SyntaxError,

View File

@ -22,7 +22,7 @@ use serde::ser;
use rustc_serialize::Encodable; use rustc_serialize::Encodable;
#[derive(Show, PartialEq, RustcEncodable, RustcDecodable)] #[derive(Debug, PartialEq, RustcEncodable, RustcDecodable)]
#[derive_serialize] #[derive_serialize]
#[derive_deserialize] #[derive_deserialize]
struct Http { struct Http {
@ -37,7 +37,7 @@ struct Http {
request_uri: String, request_uri: String,
} }
#[derive(Copy, Show, PartialEq, FromPrimitive)] #[derive(Copy, Debug, PartialEq, FromPrimitive)]
enum HttpProtocol { enum HttpProtocol {
HTTP_PROTOCOL_UNKNOWN, HTTP_PROTOCOL_UNKNOWN,
HTTP10, HTTP10,
@ -73,7 +73,7 @@ impl<D: de::Deserializer<E>, E> de::Deserialize<D, E> for HttpProtocol {
} }
} }
#[derive(Copy, Show, PartialEq, FromPrimitive)] #[derive(Copy, Debug, PartialEq, FromPrimitive)]
enum HttpMethod { enum HttpMethod {
METHOD_UNKNOWN, METHOD_UNKNOWN,
GET, GET,
@ -117,7 +117,7 @@ impl<D: de::Deserializer<E>, E> de::Deserialize<D, E> for HttpMethod {
} }
} }
#[derive(Copy, Show, PartialEq, FromPrimitive)] #[derive(Copy, Debug, PartialEq, FromPrimitive)]
enum CacheStatus { enum CacheStatus {
CACHESTATUS_UNKNOWN, CACHESTATUS_UNKNOWN,
Miss, Miss,
@ -154,7 +154,7 @@ impl<D: de::Deserializer<E>, E> de::Deserialize<D, E> for CacheStatus {
} }
} }
#[derive(Show, PartialEq, RustcEncodable, RustcDecodable)] #[derive(Debug, PartialEq, RustcEncodable, RustcDecodable)]
#[derive_serialize] #[derive_serialize]
#[derive_deserialize] #[derive_deserialize]
struct Origin { struct Origin {
@ -164,7 +164,7 @@ struct Origin {
protocol: OriginProtocol, protocol: OriginProtocol,
} }
#[derive(Copy, Show, PartialEq, FromPrimitive)] #[derive(Copy, Debug, PartialEq, FromPrimitive)]
enum OriginProtocol { enum OriginProtocol {
ORIGIN_PROTOCOL_UNKNOWN, ORIGIN_PROTOCOL_UNKNOWN,
HTTP, HTTP,
@ -200,7 +200,7 @@ impl<D: de::Deserializer<E>, E> de::Deserialize<D, E> for OriginProtocol {
} }
} }
#[derive(Copy, Show, PartialEq, FromPrimitive)] #[derive(Copy, Debug, PartialEq, FromPrimitive)]
enum ZonePlan { enum ZonePlan {
ZONEPLAN_UNKNOWN, ZONEPLAN_UNKNOWN,
FREE, FREE,
@ -238,7 +238,7 @@ impl<D: de::Deserializer<E>, E> de::Deserialize<D, E> for ZonePlan {
} }
} }
#[derive(Copy, Show, PartialEq, FromPrimitive)] #[derive(Copy, Debug, PartialEq, FromPrimitive)]
enum Country { enum Country {
UNKNOWN, UNKNOWN,
A1, A1,
@ -527,7 +527,7 @@ impl<D: de::Deserializer<E>, E> de::Deserialize<D, E> for Country {
} }
} }
#[derive(Show, PartialEq, RustcEncodable, RustcDecodable)] #[derive(Debug, PartialEq, RustcEncodable, RustcDecodable)]
#[derive_serialize] #[derive_serialize]
#[derive_deserialize] #[derive_deserialize]
struct Log { struct Log {

View File

@ -7,7 +7,7 @@ extern crate serde;
extern crate "rustc-serialize" as rustc_serialize; extern crate "rustc-serialize" as rustc_serialize;
extern crate test; extern crate test;
use std::fmt::Show; use std::fmt::Debug;
use std::collections::HashMap; use std::collections::HashMap;
use test::Bencher; use test::Bencher;
@ -17,7 +17,7 @@ use serde::de::{Deserializer, Deserialize};
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#[derive(PartialEq, Show)] #[derive(PartialEq, Debug)]
pub enum Error { pub enum Error {
EndOfStream, EndOfStream,
SyntaxError, SyntaxError,
@ -226,7 +226,7 @@ mod deserializer {
use serde::de; use serde::de;
#[derive(PartialEq, Show)] #[derive(PartialEq, Debug)]
enum State { enum State {
StartState, StartState,
KeyOrEndState, KeyOrEndState,
@ -321,7 +321,7 @@ mod deserializer {
fn run_decoder< fn run_decoder<
D: Decoder<Error=Error>, D: Decoder<Error=Error>,
T: Clone + PartialEq + Show + Decodable T: Clone + PartialEq + Debug + Decodable
>(mut d: D, value: T) { >(mut d: D, value: T) {
let v = Decodable::decode(&mut d); let v = Decodable::decode(&mut d);
@ -360,8 +360,8 @@ fn bench_decoder_100(b: &mut Bencher) {
fn run_deserializer< fn run_deserializer<
D: Deserializer<E>, D: Deserializer<E>,
E: Show, E: Debug,
T: Clone + PartialEq + Show + Deserialize<D, E> T: Clone + PartialEq + Debug + Deserialize<D, E>
>(mut d: D, value: T) { >(mut d: D, value: T) {
let v: T = Deserialize::deserialize(&mut d).unwrap(); let v: T = Deserialize::deserialize(&mut d).unwrap();

View File

@ -16,7 +16,7 @@ use serde::de::{Deserializer, Deserialize};
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#[derive(Clone, PartialEq, Show, RustcDecodable)] #[derive(Clone, PartialEq, Debug, RustcDecodable)]
#[derive_deserialize] #[derive_deserialize]
struct Inner { struct Inner {
a: (), a: (),
@ -26,7 +26,7 @@ struct Inner {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#[derive(Clone, PartialEq, Show, RustcDecodable)] #[derive(Clone, PartialEq, Debug, RustcDecodable)]
#[derive_deserialize] #[derive_deserialize]
struct Outer { struct Outer {
inner: Vec<Inner>, inner: Vec<Inner>,
@ -34,7 +34,7 @@ struct Outer {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#[derive(Show)] #[derive(Debug)]
pub enum Error { pub enum Error {
EndOfStream, EndOfStream,
SyntaxError(String), SyntaxError(String),
@ -63,7 +63,7 @@ mod decoder {
OptionState, OptionState,
}; };
#[derive(Show)] #[derive(Debug)]
enum State { enum State {
OuterState(Outer), OuterState(Outer),
InnerState(Inner), InnerState(Inner),
@ -339,7 +339,7 @@ mod deserializer {
EndState, EndState,
}; };
#[derive(Show)] #[derive(Debug)]
enum State { enum State {
OuterState(Outer), OuterState(Outer),
InnerState(Inner), InnerState(Inner),

View File

@ -7,7 +7,7 @@ extern crate serde;
extern crate "rustc-serialize" as rustc_serialize; extern crate "rustc-serialize" as rustc_serialize;
extern crate test; extern crate test;
use std::fmt::Show; use std::fmt::Debug;
use test::Bencher; use test::Bencher;
use rustc_serialize::{Decoder, Decodable}; use rustc_serialize::{Decoder, Decodable};
@ -16,7 +16,7 @@ use serde::de::{Deserializer, Deserialize};
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#[derive(PartialEq, Show)] #[derive(PartialEq, Debug)]
pub enum Error { pub enum Error {
EndOfStream, EndOfStream,
SyntaxError, SyntaxError,
@ -353,7 +353,7 @@ mod deserializer {
use serde::de; use serde::de;
#[derive(PartialEq, Show)] #[derive(PartialEq, Debug)]
enum State { enum State {
StartState, StartState,
SepOrEndState, SepOrEndState,
@ -513,7 +513,7 @@ mod deserializer {
fn run_decoder< fn run_decoder<
D: Decoder<Error=Error>, D: Decoder<Error=Error>,
T: Clone + PartialEq + Show + Decodable T: Clone + PartialEq + Debug + Decodable
>(mut d: D, value: T) { >(mut d: D, value: T) {
let v = Decodable::decode(&mut d); let v = Decodable::decode(&mut d);
@ -522,8 +522,8 @@ fn run_decoder<
fn run_deserializer< fn run_deserializer<
D: Deserializer<E>, D: Deserializer<E>,
E: Show, E: Debug,
T: Clone + PartialEq + Show + Deserialize<D, E> T: Clone + PartialEq + Debug + Deserialize<D, E>
>(mut d: D, value: T) { >(mut d: D, value: T) {
let v: T = Deserialize::deserialize(&mut d).unwrap(); let v: T = Deserialize::deserialize(&mut d).unwrap();

View File

@ -66,7 +66,7 @@ impl de::Deserialize for HttpField {
} }
} }
#[derive(Show, PartialEq, RustcEncodable, RustcDecodable)] #[derive(Debug, PartialEq, RustcEncodable, RustcDecodable)]
#[derive_serialize] #[derive_serialize]
//#[derive_deserialize] //#[derive_deserialize]
struct Http { struct Http {
@ -135,7 +135,7 @@ impl de::Deserialize for Http {
} }
} }
#[derive(Copy, Show, PartialEq, FromPrimitive)] #[derive(Copy, Debug, PartialEq, FromPrimitive)]
enum HttpProtocol { enum HttpProtocol {
HTTP_PROTOCOL_UNKNOWN, HTTP_PROTOCOL_UNKNOWN,
HTTP10, HTTP10,
@ -175,7 +175,7 @@ impl de::Deserialize for HttpProtocol {
} }
} }
#[derive(Copy, Show, PartialEq, FromPrimitive)] #[derive(Copy, Debug, PartialEq, FromPrimitive)]
enum HttpMethod { enum HttpMethod {
METHOD_UNKNOWN, METHOD_UNKNOWN,
GET, GET,
@ -223,7 +223,7 @@ impl de::Deserialize for HttpMethod {
} }
} }
#[derive(Copy, Show, PartialEq, FromPrimitive)] #[derive(Copy, Debug, PartialEq, FromPrimitive)]
enum CacheStatus { enum CacheStatus {
CACHESTATUS_UNKNOWN, CACHESTATUS_UNKNOWN,
Miss, Miss,
@ -298,7 +298,7 @@ impl de::Deserialize for OriginField {
} }
} }
#[derive(Show, PartialEq, RustcEncodable, RustcDecodable)] #[derive(Debug, PartialEq, RustcEncodable, RustcDecodable)]
#[derive_serialize] #[derive_serialize]
//#[derive_deserialize] //#[derive_deserialize]
struct Origin { struct Origin {
@ -347,7 +347,7 @@ impl Deserialize for Origin {
} }
} }
#[derive(Copy, Show, PartialEq, FromPrimitive)] #[derive(Copy, Debug, PartialEq, FromPrimitive)]
enum OriginProtocol { enum OriginProtocol {
ORIGIN_PROTOCOL_UNKNOWN, ORIGIN_PROTOCOL_UNKNOWN,
HTTP, HTTP,
@ -387,7 +387,7 @@ impl de::Deserialize for OriginProtocol {
} }
} }
#[derive(Copy, Show, PartialEq, FromPrimitive)] #[derive(Copy, Debug, PartialEq, FromPrimitive)]
enum ZonePlan { enum ZonePlan {
ZONEPLAN_UNKNOWN, ZONEPLAN_UNKNOWN,
FREE, FREE,
@ -429,7 +429,7 @@ impl de::Deserialize for ZonePlan {
} }
} }
#[derive(Copy, Show, PartialEq, FromPrimitive)] #[derive(Copy, Debug, PartialEq, FromPrimitive)]
enum Country { enum Country {
UNKNOWN, UNKNOWN,
A1, A1,
@ -772,7 +772,7 @@ impl de::Deserialize for LogField {
} }
} }
#[derive(Show, PartialEq, RustcEncodable, RustcDecodable)] #[derive(Debug, PartialEq, RustcEncodable, RustcDecodable)]
#[derive_serialize] #[derive_serialize]
//#[derive_deserialize] //#[derive_deserialize]
struct Log { struct Log {

View File

@ -665,7 +665,7 @@ mod tests {
use std::iter; use std::iter;
use std::vec; use std::vec;
#[derive(Show)] #[derive(Debug)]
enum Token<'a> { enum Token<'a> {
Bool(bool), Bool(bool),
Isize(isize), Isize(isize),
@ -715,7 +715,7 @@ mod tests {
} }
} }
#[derive(Copy, PartialEq, Show)] #[derive(Copy, PartialEq, Debug)]
enum Error { enum Error {
SyntaxError, SyntaxError,
EndOfStreamError, EndOfStreamError,
@ -973,7 +973,7 @@ mod tests {
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#[derive(Copy, PartialEq, Show)] #[derive(Copy, PartialEq, Debug)]
struct NamedUnit; struct NamedUnit;
impl Deserialize for NamedUnit { impl Deserialize for NamedUnit {
@ -1015,7 +1015,7 @@ mod tests {
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#[derive(PartialEq, Show)] #[derive(PartialEq, Debug)]
struct NamedSeq(i32, i32, i32); struct NamedSeq(i32, i32, i32);
impl Deserialize for NamedSeq { impl Deserialize for NamedSeq {
@ -1067,7 +1067,7 @@ mod tests {
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#[derive(PartialEq, Show)] #[derive(PartialEq, Debug)]
struct NamedMap { struct NamedMap {
a: i32, a: i32,
b: i32, b: i32,
@ -1152,7 +1152,7 @@ mod tests {
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#[derive(PartialEq, Show)] #[derive(PartialEq, Debug)]
enum Enum { enum Enum {
Unit, Unit,
Seq(i32, i32, i32), Seq(i32, i32, i32),

View File

@ -529,7 +529,7 @@ pub fn from_str<'a, T>(s: &'a str) -> Result<T, Error>
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use std::str; use std::str;
use std::fmt::Show; use std::fmt::Debug;
use std::collections::BTreeMap; use std::collections::BTreeMap;
use de::Deserialize; use de::Deserialize;
@ -545,7 +545,7 @@ mod tests {
} }
fn test_parse_ok<'a, T>(errors: Vec<(&'a str, T)>) fn test_parse_ok<'a, T>(errors: Vec<(&'a str, T)>)
where T: PartialEq + Show + Deserialize, where T: PartialEq + Debug + Deserialize,
{ {
for (s, value) in errors.into_iter() { for (s, value) in errors.into_iter() {
let v: Result<T, Error> = from_str(s); let v: Result<T, Error> = from_str(s);
@ -559,7 +559,7 @@ mod tests {
} }
fn test_parse_err<'a, T>(errors: Vec<(&'a str, Error)>) fn test_parse_err<'a, T>(errors: Vec<(&'a str, Error)>)
where T: PartialEq + Show + Deserialize where T: PartialEq + Debug + Deserialize
{ {
for (s, err) in errors.into_iter() { for (s, err) in errors.into_iter() {
let v: Result<T, Error> = from_str(s); let v: Result<T, Error> = from_str(s);

View File

@ -37,7 +37,7 @@ pub enum ErrorCode {
UnrecognizedHex, UnrecognizedHex,
} }
impl fmt::Show for ErrorCode { impl fmt::Debug for ErrorCode {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self { match *self {
//ErrorCode::ConversionError(ref token) => write!(f, "failed to convert {}", token), //ErrorCode::ConversionError(ref token) => write!(f, "failed to convert {}", token),
@ -75,7 +75,7 @@ impl fmt::Show for ErrorCode {
} }
} }
#[derive(Clone, PartialEq, Show)] #[derive(Clone, PartialEq, Debug)]
pub enum Error { pub enum Error {
/// msg, line, col /// msg, line, col
SyntaxError(ErrorCode, usize, usize), SyntaxError(ErrorCode, usize, usize),

View File

@ -57,7 +57,7 @@ impl<'a, 'b> io::Writer for WriterFormatter<'a, 'b> {
} }
} }
impl fmt::Show for Value { impl fmt::Debug for Value {
/// Serializes a json value into a string /// Serializes a json value into a string
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let mut wr = WriterFormatter { inner: f }; let mut wr = WriterFormatter { inner: f };

View File

@ -651,7 +651,7 @@ mod tests {
use std::vec; use std::vec;
use std::collections::BTreeMap; use std::collections::BTreeMap;
#[derive(Clone, PartialEq, Show)] #[derive(Clone, PartialEq, Debug)]
pub enum Token<'a> { pub enum Token<'a> {
Bool(bool), Bool(bool),
Isize(isize), Isize(isize),

View File

@ -18,7 +18,7 @@ use std::rc::Rc;
use std::string; use std::string;
use std::sync::Arc; use std::sync::Arc;
#[derive(Clone, PartialEq, Show)] #[derive(Clone, PartialEq, Debug)]
pub enum Token { pub enum Token {
Null, Null,
Bool(bool), Bool(bool),
@ -138,7 +138,7 @@ static COMPOUND_TOKEN_KINDS: &'static [TokenKind] = &[
TokenKind::MapStartKind, TokenKind::MapStartKind,
]; ];
impl ::std::fmt::Show for TokenKind { impl ::std::fmt::Debug for TokenKind {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
match *self { match *self {
TokenKind::NullKind => "Null".fmt(f), TokenKind::NullKind => "Null".fmt(f),
@ -1091,7 +1091,7 @@ mod tests {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#[derive(Clone, PartialEq, Show, RustcDecodable)] #[derive(Clone, PartialEq, Debug, RustcDecodable)]
struct Inner { struct Inner {
a: (), a: (),
b: usize, b: usize,
@ -1133,7 +1133,7 @@ mod tests {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#[derive(Clone, PartialEq, Show, RustcDecodable)] #[derive(Clone, PartialEq, Debug, RustcDecodable)]
struct Outer { struct Outer {
inner: Vec<Inner>, inner: Vec<Inner>,
} }
@ -1166,7 +1166,7 @@ mod tests {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#[derive(Clone, PartialEq, Show, RustcDecodable)] #[derive(Clone, PartialEq, Debug, RustcDecodable)]
enum Animal { enum Animal {
Dog, Dog,
Frog(string::String, isize) Frog(string::String, isize)
@ -1193,7 +1193,7 @@ mod tests {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#[derive(Show)] #[derive(Debug)]
enum Error { enum Error {
EndOfStream, EndOfStream,
SyntaxError(Vec<TokenKind>), SyntaxError(Vec<TokenKind>),

View File

@ -7,7 +7,7 @@ use de;
use super::error::{Error, ErrorCode}; use super::error::{Error, ErrorCode};
#[derive(PartialEq, Show)] #[derive(PartialEq, Debug)]
enum State { enum State {
// Parse a value. // Parse a value.
Value, Value,

View File

@ -40,7 +40,7 @@ pub enum ErrorCode {
UnrecognizedHex, UnrecognizedHex,
} }
impl fmt::Show for ErrorCode { impl fmt::Debug for ErrorCode {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self { match *self {
ErrorCode::ConversionError(ref token) => write!(f, "failed to convert {:?}", token), ErrorCode::ConversionError(ref token) => write!(f, "failed to convert {:?}", token),
@ -78,7 +78,7 @@ impl fmt::Show for ErrorCode {
} }
} }
#[derive(Clone, PartialEq, Show)] #[derive(Clone, PartialEq, Debug)]
pub enum Error { pub enum Error {
/// msg, line, col /// msg, line, col
SyntaxError(ErrorCode, usize, usize), SyntaxError(ErrorCode, usize, usize),

View File

@ -318,7 +318,7 @@ pub mod error;
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use std::fmt::Show; use std::fmt::Debug;
use std::io; use std::io;
use std::str; use std::str;
use std::string; use std::string;
@ -357,7 +357,7 @@ mod tests {
}) })
} }
#[derive(PartialEq, Show)] #[derive(PartialEq, Debug)]
#[derive_serialize] #[derive_serialize]
#[derive_deserialize] #[derive_deserialize]
enum Animal { enum Animal {
@ -386,7 +386,7 @@ mod tests {
} }
} }
#[derive(PartialEq, Show)] #[derive(PartialEq, Debug)]
#[derive_serialize] #[derive_serialize]
#[derive_deserialize] #[derive_deserialize]
struct Inner { struct Inner {
@ -407,7 +407,7 @@ mod tests {
} }
} }
#[derive(PartialEq, Show)] #[derive(PartialEq, Debug)]
#[derive_serialize] #[derive_serialize]
#[derive_deserialize] #[derive_deserialize]
struct Outer { struct Outer {
@ -425,7 +425,7 @@ mod tests {
} }
fn test_encode_ok< fn test_encode_ok<
T: PartialEq + Show + ToJson + ser::Serialize<super::Serializer<Vec<u8>>, io::IoError> T: PartialEq + Debug + ToJson + ser::Serialize<super::Serializer<Vec<u8>>, io::IoError>
>(errors: &[(T, &str)]) { >(errors: &[(T, &str)]) {
for &(ref value, out) in errors.iter() { for &(ref value, out) in errors.iter() {
let out = out.to_string(); let out = out.to_string();
@ -439,7 +439,7 @@ mod tests {
} }
fn test_pretty_encode_ok< fn test_pretty_encode_ok<
T: PartialEq + Show + ToJson + ser::Serialize<super::PrettySerializer<Vec<u8>>, io::IoError> T: PartialEq + Debug + ToJson + ser::Serialize<super::PrettySerializer<Vec<u8>>, old_io::IoError>
>(errors: &[(T, &str)]) { >(errors: &[(T, &str)]) {
for &(ref value, out) in errors.iter() { for &(ref value, out) in errors.iter() {
let out = out.to_string(); let out = out.to_string();
@ -776,7 +776,7 @@ mod tests {
// FIXME (#5527): these could be merged once UFCS is finished. // FIXME (#5527): these could be merged once UFCS is finished.
fn test_parse_err< fn test_parse_err<
'a, 'a,
T: Show + de::Deserialize<Parser<str::Bytes<'a>>, Error> T: Debug + de::Deserialize<Parser<str::Bytes<'a>>, Error>
>(errors: &[(&'a str, Error)]) { >(errors: &[(&'a str, Error)]) {
for &(s, ref err) in errors.iter() { for &(s, ref err) in errors.iter() {
let v: Result<T, Error> = from_str(s); let v: Result<T, Error> = from_str(s);
@ -786,7 +786,7 @@ mod tests {
fn test_parse_ok< fn test_parse_ok<
'a, 'a,
T: PartialEq + Show + ToJson + de::Deserialize<Parser<str::Bytes<'a>>, Error> T: PartialEq + Debug + ToJson + de::Deserialize<Parser<str::Bytes<'a>>, Error>
>(errors: &[(&'a str, T)]) { >(errors: &[(&'a str, T)]) {
for &(s, ref value) in errors.iter() { for &(s, ref value) in errors.iter() {
let v: T = from_str(s).unwrap(); let v: T = from_str(s).unwrap();
@ -798,7 +798,7 @@ mod tests {
} }
fn test_json_deserialize_ok< fn test_json_deserialize_ok<
T: PartialEq + Show + ToJson + de::Deserialize<value::Deserializer, Error> T: PartialEq + Debug + ToJson + de::Deserialize<value::Deserializer, Error>
>(errors: &[T]) { >(errors: &[T]) {
for value in errors.iter() { for value in errors.iter() {
let v: T = from_json(value.to_json()).unwrap(); let v: T = from_json(value.to_json()).unwrap();
@ -1103,7 +1103,7 @@ mod tests {
("\"jodhpurs\"", Some("jodhpurs".to_string())), ("\"jodhpurs\"", Some("jodhpurs".to_string())),
]); ]);
#[derive(PartialEq, Show)] #[derive(PartialEq, Debug)]
#[derive_serialize] #[derive_serialize]
#[derive_deserialize] #[derive_deserialize]
struct Foo { struct Foo {

View File

@ -81,7 +81,7 @@ fn spaces<W: Writer>(wr: &mut W, mut n: usize) -> IoResult<()> {
} }
/* /*
#[derive(Show)] #[derive(Debug)]
enum SerializerState { enum SerializerState {
ValueState, ValueState,
TupleState, TupleState,

View File

@ -226,7 +226,7 @@ impl<'a, 'b> Writer for WriterFormatter<'a, 'b> {
} }
} }
impl fmt::Show for Value { impl fmt::Debug for Value {
/// Serializes a json value into a string /// Serializes a json value into a string
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let wr = WriterFormatter { inner: f }; let wr = WriterFormatter { inner: f };

View File

@ -328,7 +328,7 @@ mod tests {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#[derive(Clone, PartialEq, Show, RustcDecodable)] #[derive(Clone, PartialEq, Debug, RustcDecodable)]
#[derive_serialize] #[derive_serialize]
struct Inner { struct Inner {
a: (), a: (),
@ -338,7 +338,7 @@ mod tests {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#[derive(Clone, PartialEq, Show, RustcDecodable)] #[derive(Clone, PartialEq, Debug, RustcDecodable)]
#[derive_serialize] #[derive_serialize]
struct Outer { struct Outer {
inner: Vec<Inner>, inner: Vec<Inner>,
@ -346,7 +346,7 @@ mod tests {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#[derive(Clone, PartialEq, Show, RustcDecodable)] #[derive(Clone, PartialEq, Debug, RustcDecodable)]
#[derive_serialize] #[derive_serialize]
enum Animal { enum Animal {
Dog, Dog,
@ -355,7 +355,7 @@ mod tests {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#[derive(Clone, PartialEq, Show)] #[derive(Clone, PartialEq, Debug)]
pub enum Token<'a> { pub enum Token<'a> {
Null, Null,
Bool(bool), Bool(bool),
@ -395,7 +395,7 @@ mod tests {
MapEnd, MapEnd,
} }
#[derive(Show)] #[derive(Debug)]
#[allow(dead_code)] #[allow(dead_code)]
enum Error { enum Error {
EndOfStream, EndOfStream,

View File

@ -4,7 +4,7 @@ extern crate serde;
#[plugin] #[plugin]
extern crate serde_macros; extern crate serde_macros;
#[derive(PartialEq, Show)] #[derive(PartialEq, Debug)]
#[derive_serialize] #[derive_serialize]
#[derive_deserialize] #[derive_deserialize]
struct Test { struct Test {