diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2015-01-28 08:34:18 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2015-01-29 07:49:02 -0500 |
| commit | 788181d4055747b5307f186a873ab5d2acd29994 (patch) | |
| tree | 9b96bbdba0acfccaa447f312c07381425776ca80 | |
| parent | 09ba9f5c87a24f82d9a332fdb913511eedf5a4ec (diff) | |
| download | rust-788181d4055747b5307f186a873ab5d2acd29994.tar.gz rust-788181d4055747b5307f186a873ab5d2acd29994.zip | |
s/Show/Debug/g
195 files changed, 577 insertions, 577 deletions
diff --git a/src/compiletest/errors.rs b/src/compiletest/errors.rs index 868512c7943..40d4397916d 100644 --- a/src/compiletest/errors.rs +++ b/src/compiletest/errors.rs @@ -17,7 +17,7 @@ pub struct ExpectedError { pub msg: String, } -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] enum WhichLine { ThisLine, FollowPrevious(uint), AdjustBackward(uint) } /// Looks for either "//~| KIND MESSAGE" or "//~^^... KIND MESSAGE" diff --git a/src/doc/trpl/error-handling.md b/src/doc/trpl/error-handling.md index d66142edf3f..68b36e7a4b7 100644 --- a/src/doc/trpl/error-handling.md +++ b/src/doc/trpl/error-handling.md @@ -147,10 +147,10 @@ for all but the most trivial of situations. Here's an example of using `Result`: ```rust -#[derive(Show)] +#[derive(Debug)] enum Version { Version1, Version2 } -#[derive(Show)] +#[derive(Debug)] enum ParseError { InvalidHeaderLength, InvalidVersion } fn parse_version(header: &[u8]) -> Result<Version, ParseError> { diff --git a/src/doc/trpl/pointers.md b/src/doc/trpl/pointers.md index 29986d7f235..9c649cd2273 100644 --- a/src/doc/trpl/pointers.md +++ b/src/doc/trpl/pointers.md @@ -605,7 +605,7 @@ Sometimes, you need a recursive data structure. The simplest is known as a ```{rust} -#[derive(Show)] +#[derive(Debug)] enum List<T> { Cons(T, Box<List<T>>), Nil, diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index 90e761a4f1e..f9f6de2df58 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -814,6 +814,6 @@ mod tests { } // Make sure deriving works with Arc<T> - #[derive(Eq, Ord, PartialEq, PartialOrd, Clone, Show, Default)] + #[derive(Eq, Ord, PartialEq, PartialOrd, Clone, Debug, Default)] struct Foo { inner: Arc<int> } } diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index b82b02589c0..91577e30d9a 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -29,7 +29,7 @@ //! Creating a recursive data structure: //! //! ``` -//! #[derive(Show)] +//! #[derive(Debug)] //! enum List<T> { //! Cons(T, Box<List<T>>), //! Nil, diff --git a/src/libcollections/enum_set.rs b/src/libcollections/enum_set.rs index f36da6f82eb..b542259eba0 100644 --- a/src/libcollections/enum_set.rs +++ b/src/libcollections/enum_set.rs @@ -272,7 +272,7 @@ mod test { use super::{EnumSet, CLike}; - #[derive(Copy, PartialEq, Show)] + #[derive(Copy, PartialEq, Debug)] #[repr(uint)] enum Foo { A, B, C diff --git a/src/libcollections/ring_buf.rs b/src/libcollections/ring_buf.rs index 2e2ae111285..34910f59fe0 100644 --- a/src/libcollections/ring_buf.rs +++ b/src/libcollections/ring_buf.rs @@ -1852,21 +1852,21 @@ mod tests { }) } - #[derive(Clone, PartialEq, Show)] + #[derive(Clone, PartialEq, Debug)] enum Taggy { One(int), Two(int, int), Three(int, int, int), } - #[derive(Clone, PartialEq, Show)] + #[derive(Clone, PartialEq, Debug)] enum Taggypar<T> { Onepar(int), Twopar(int, int), Threepar(int, int, int), } - #[derive(Clone, PartialEq, Show)] + #[derive(Clone, PartialEq, Debug)] struct RecCy { x: int, y: int, diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index 36688652a47..8f7920fe1c4 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -41,7 +41,7 @@ pub struct String { /// A possible error value from the `String::from_utf8` function. #[stable(feature = "rust1", since = "1.0.0")] -#[derive(Show)] +#[derive(Debug)] pub struct FromUtf8Error { bytes: Vec<u8>, error: Utf8Error, @@ -50,7 +50,7 @@ pub struct FromUtf8Error { /// A possible error value from the `String::from_utf16` function. #[stable(feature = "rust1", since = "1.0.0")] #[allow(missing_copy_implementations)] -#[derive(Show)] +#[derive(Debug)] pub struct FromUtf16Error(()); impl String { diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 74f6d4bad09..336a3d7521a 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -811,7 +811,7 @@ impl<T> Vec<T> { /// let w = v.map_in_place(|i| i + 3); /// assert_eq!(w.as_slice(), [3, 4, 5].as_slice()); /// - /// #[derive(PartialEq, Show)] + /// #[derive(PartialEq, Debug)] /// struct Newtype(u8); /// let bytes = vec![0x11, 0x22]; /// let newtyped_bytes = bytes.map_in_place(|x| Newtype(x)); @@ -2279,7 +2279,7 @@ mod tests { #[test] fn test_map_in_place_zero_sized() { let v = vec![(), ()]; - #[derive(PartialEq, Show)] + #[derive(PartialEq, Debug)] struct ZeroSized; assert_eq!(v.map_in_place(|_| ZeroSized), [ZeroSized, ZeroSized]); } @@ -2288,11 +2288,11 @@ mod tests { fn test_map_in_place_zero_drop_count() { use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT}; - #[derive(Clone, PartialEq, Show)] + #[derive(Clone, PartialEq, Debug)] struct Nothing; impl Drop for Nothing { fn drop(&mut self) { } } - #[derive(Clone, PartialEq, Show)] + #[derive(Clone, PartialEq, Debug)] struct ZeroSized; impl Drop for ZeroSized { fn drop(&mut self) { diff --git a/src/libcore/any.rs b/src/libcore/any.rs index 858808dd6ba..40c2d82bf4b 100644 --- a/src/libcore/any.rs +++ b/src/libcore/any.rs @@ -166,7 +166,7 @@ impl Any { /// /// A `TypeId` is currently only available for types which ascribe to `'static`, /// but this limitation may be removed in the future. -#[derive(Clone, Copy, PartialEq, Eq, Show, Hash)] +#[derive(Clone, Copy, PartialEq, Eq, Debug, Hash)] #[stable(feature = "rust1", since = "1.0.0")] pub struct TypeId { t: u64, diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index 2ecbd55fcb1..1ebd2df5814 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -105,7 +105,7 @@ pub trait Eq: PartialEq<Self> { } /// An ordering is, e.g, a result of a comparison between two values. -#[derive(Clone, Copy, PartialEq, Show)] +#[derive(Clone, Copy, PartialEq, Debug)] #[stable(feature = "rust1", since = "1.0.0")] pub enum Ordering { /// An ordering where a compared value is less [than another]. diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index 50021c668d5..8b7a4c677ac 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -48,7 +48,7 @@ pub type Result = result::Result<(), Error>; /// some other means. #[unstable(feature = "core", reason = "core and I/O reconciliation may alter this definition")] -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub struct Error; /// A collection of methods that are required to format a message into a stream. diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index 8e995fed1bc..b6b2f9c57fe 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -1224,7 +1224,7 @@ impl_multiplicative! { f32, 1.0 } impl_multiplicative! { f64, 1.0 } /// `MinMaxResult` is an enum returned by `min_max`. See `IteratorOrdExt::min_max` for more detail. -#[derive(Clone, PartialEq, Show)] +#[derive(Clone, PartialEq, Debug)] #[unstable(feature = "core", reason = "unclear whether such a fine-grained result is widely useful")] pub enum MinMaxResult<T> { diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index 1fc3e34af5e..299cdbda3cc 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -50,7 +50,7 @@ pub trait Sized { /// words: /// /// ``` -/// #[derive(Show)] +/// #[derive(Debug)] /// struct Foo; /// /// let x = Foo; @@ -66,7 +66,7 @@ pub trait Sized { /// /// ``` /// // we can just derive a `Copy` implementation -/// #[derive(Show, Copy)] +/// #[derive(Debug, Copy)] /// struct Foo; /// /// let x = Foo; diff --git a/src/libcore/nonzero.rs b/src/libcore/nonzero.rs index 495c7c2bc2e..9ccea3b0739 100644 --- a/src/libcore/nonzero.rs +++ b/src/libcore/nonzero.rs @@ -31,7 +31,7 @@ unsafe impl Zeroable for u64 {} /// A wrapper type for raw pointers and integers that will never be /// NULL or 0 that might allow certain optimizations. #[lang="non_zero"] -#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Show, Hash)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Hash)] #[unstable(feature = "core")] pub struct NonZero<T: Zeroable>(T); diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 9e460492b64..dd9cc553c7c 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -1241,7 +1241,7 @@ impl_num_cast! { f32, to_f32 } impl_num_cast! { f64, to_f64 } /// Used for representing the classification of floating point numbers -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] #[unstable(feature = "core", reason = "may be renamed")] pub enum FpCategory { /// "Not a Number", often obtained by dividing by zero diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index bbb964508b4..55ff3eb4d06 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -35,7 +35,7 @@ //! ```rust //! use std::ops::{Add, Sub}; //! -//! #[derive(Show)] +//! #[derive(Debug)] //! struct Point { //! x: int, //! y: int diff --git a/src/libcore/option.rs b/src/libcore/option.rs index c7266aa4f1a..5cb8e5e5565 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -163,7 +163,7 @@ use slice; // which basically means it must be `Option`. /// The `Option` type. -#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Show, Hash)] +#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)] #[stable(feature = "rust1", since = "1.0.0")] pub enum Option<T> { /// No value diff --git a/src/libcore/result.rs b/src/libcore/result.rs index 1af171ee7e3..92a7465038b 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -30,7 +30,7 @@ //! defined and used like so: //! //! ``` -//! #[derive(Show)] +//! #[derive(Debug)] //! enum Version { Version1, Version2 } //! //! fn parse_version(header: &[u8]) -> Result<Version, &'static str> { @@ -239,7 +239,7 @@ use slice; /// `Result` is a type that represents either success (`Ok`) or failure (`Err`). /// /// See the [`std::result`](index.html) module documentation for details. -#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Show, Hash)] +#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)] #[must_use] #[stable(feature = "rust1", since = "1.0.0")] pub enum Result<T, E> { diff --git a/src/libcore/simd.rs b/src/libcore/simd.rs index 4a1c123668f..0058971faf0 100644 --- a/src/libcore/simd.rs +++ b/src/libcore/simd.rs @@ -38,7 +38,7 @@ #[unstable(feature = "core")] #[simd] -#[derive(Copy, Show)] +#[derive(Copy, Debug)] #[repr(C)] pub struct i8x16(pub i8, pub i8, pub i8, pub i8, pub i8, pub i8, pub i8, pub i8, @@ -47,26 +47,26 @@ pub struct i8x16(pub i8, pub i8, pub i8, pub i8, #[unstable(feature = "core")] #[simd] -#[derive(Copy, Show)] +#[derive(Copy, Debug)] #[repr(C)] pub struct i16x8(pub i16, pub i16, pub i16, pub i16, pub i16, pub i16, pub i16, pub i16); #[unstable(feature = "core")] #[simd] -#[derive(Copy, Show)] +#[derive(Copy, Debug)] #[repr(C)] pub struct i32x4(pub i32, pub i32, pub i32, pub i32); #[unstable(feature = "core")] #[simd] -#[derive(Copy, Show)] +#[derive(Copy, Debug)] #[repr(C)] pub struct i64x2(pub i64, pub i64); #[unstable(feature = "core")] #[simd] -#[derive(Copy, Show)] +#[derive(Copy, Debug)] #[repr(C)] pub struct u8x16(pub u8, pub u8, pub u8, pub u8, pub u8, pub u8, pub u8, pub u8, @@ -75,31 +75,31 @@ pub struct u8x16(pub u8, pub u8, pub u8, pub u8, #[unstable(feature = "core")] #[simd] -#[derive(Copy, Show)] +#[derive(Copy, Debug)] #[repr(C)] pub struct u16x8(pub u16, pub u16, pub u16, pub u16, pub u16, pub u16, pub u16, pub u16); #[unstable(feature = "core")] #[simd] -#[derive(Copy, Show)] +#[derive(Copy, Debug)] #[repr(C)] pub struct u32x4(pub u32, pub u32, pub u32, pub u32); #[unstable(feature = "core")] #[simd] -#[derive(Copy, Show)] +#[derive(Copy, Debug)] #[repr(C)] pub struct u64x2(pub u64, pub u64); #[unstable(feature = "core")] #[simd] -#[derive(Copy, Show)] +#[derive(Copy, Debug)] #[repr(C)] pub struct f32x4(pub f32, pub f32, pub f32, pub f32); #[unstable(feature = "core")] #[simd] -#[derive(Copy, Show)] +#[derive(Copy, Debug)] #[repr(C)] pub struct f64x2(pub f64, pub f64); diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 231b96b5114..22851965644 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -144,7 +144,7 @@ Section: Creating a string */ /// Errors which can occur when attempting to interpret a byte slice as a `str`. -#[derive(Copy, Eq, PartialEq, Clone, Show)] +#[derive(Copy, Eq, PartialEq, Clone, Debug)] #[unstable(feature = "core", reason = "error enumeration recently added and definitions may be refined")] pub enum Utf8Error { diff --git a/src/libcoretest/any.rs b/src/libcoretest/any.rs index e6a7170acea..7c71c733662 100644 --- a/src/libcoretest/any.rs +++ b/src/libcoretest/any.rs @@ -11,7 +11,7 @@ use core::any::*; use test::Bencher; use test; -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] struct Test; static TEST: &'static str = "Test"; diff --git a/src/libgetopts/lib.rs b/src/libgetopts/lib.rs index 425b1c5b014..7b86dab8a7c 100644 --- a/src/libgetopts/lib.rs +++ b/src/libgetopts/lib.rs @@ -111,7 +111,7 @@ use std::iter::repeat; use std::result; /// Name of an option. Either a string or a single char. -#[derive(Clone, PartialEq, Eq, Show)] +#[derive(Clone, PartialEq, Eq, Debug)] pub enum Name { /// A string representing the long name of an option. /// For example: "help" @@ -122,7 +122,7 @@ pub enum Name { } /// Describes whether an option has an argument. -#[derive(Clone, Copy, PartialEq, Eq, Show)] +#[derive(Clone, Copy, PartialEq, Eq, Debug)] pub enum HasArg { /// The option requires an argument. Yes, @@ -133,7 +133,7 @@ pub enum HasArg { } /// Describes how often an option may occur. -#[derive(Clone, Copy, PartialEq, Eq, Show)] +#[derive(Clone, Copy, PartialEq, Eq, Debug)] pub enum Occur { /// The option occurs once. Req, @@ -144,7 +144,7 @@ pub enum Occur { } /// A description of a possible option. -#[derive(Clone, PartialEq, Eq, Show)] +#[derive(Clone, PartialEq, Eq, Debug)] pub struct Opt { /// Name of the option pub name: Name, @@ -158,7 +158,7 @@ pub struct Opt { /// One group of options, e.g., both `-h` and `--help`, along with /// their shared description and properties. -#[derive(Clone, PartialEq, Eq, Show)] +#[derive(Clone, PartialEq, Eq, Debug)] pub struct OptGroup { /// Short name of the option, e.g. `h` for a `-h` option pub short_name: String, @@ -175,7 +175,7 @@ pub struct OptGroup { } /// Describes whether an option is given at all or has a value. -#[derive(Clone, PartialEq, Eq, Show)] +#[derive(Clone, PartialEq, Eq, Debug)] enum Optval { Val(String), Given, @@ -183,7 +183,7 @@ enum Optval { /// The result of checking command line arguments. Contains a vector /// of matches and a vector of free strings. -#[derive(Clone, PartialEq, Eq, Show)] +#[derive(Clone, PartialEq, Eq, Debug)] pub struct Matches { /// Options that matched opts: Vec<Opt>, @@ -196,7 +196,7 @@ pub struct Matches { /// The type returned when the command line does not conform to the /// expected format. Use the `Show` implementation to output detailed /// information. -#[derive(Clone, PartialEq, Eq, Show)] +#[derive(Clone, PartialEq, Eq, Debug)] pub enum Fail { /// The option requires an argument but none was passed. ArgumentMissing(String), @@ -211,7 +211,7 @@ pub enum Fail { } /// The type of failure that occurred. -#[derive(Copy, PartialEq, Eq, Show)] +#[derive(Copy, PartialEq, Eq, Debug)] #[allow(missing_docs)] pub enum FailType { ArgumentMissing_, diff --git a/src/libgraphviz/lib.rs b/src/libgraphviz/lib.rs index deb00912646..21d5cd3d516 100644 --- a/src/libgraphviz/lib.rs +++ b/src/libgraphviz/lib.rs @@ -523,7 +523,7 @@ pub trait GraphWalk<'a, N, E> { fn target(&'a self, edge: &E) -> N; } -#[derive(Copy, PartialEq, Eq, Show)] +#[derive(Copy, PartialEq, Eq, Debug)] pub enum RenderOption { NoEdgeLabels, NoNodeLabels, diff --git a/src/liblog/directive.rs b/src/liblog/directive.rs index 5efa799f562..edd93358bfa 100644 --- a/src/liblog/directive.rs +++ b/src/liblog/directive.rs @@ -11,7 +11,7 @@ use std::ascii::AsciiExt; use std::cmp; -#[derive(Show, Clone)] +#[derive(Debug, Clone)] pub struct LogDirective { pub name: Option<String>, pub level: u32, diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs index dfec2c18816..0e2ab008e13 100644 --- a/src/liblog/lib.rs +++ b/src/liblog/lib.rs @@ -243,7 +243,7 @@ struct DefaultLogger { } /// Wraps the log level with fmt implementations. -#[derive(Copy, PartialEq, PartialOrd, Show)] +#[derive(Copy, PartialEq, PartialOrd, Debug)] pub struct LogLevel(pub u32); impl fmt::Display for LogLevel { @@ -330,7 +330,7 @@ pub fn set_logger(logger: Box<Logger + Send>) -> Option<Box<Logger + Send>> { /// A LogRecord is created by the logging macros, and passed as the only /// argument to Loggers. -#[derive(Show)] +#[derive(Debug)] pub struct LogRecord<'a> { /// The module path of where the LogRecord originated. diff --git a/src/librand/distributions/mod.rs b/src/librand/distributions/mod.rs index 77157e2c8ba..8d87a8e5f0e 100644 --- a/src/librand/distributions/mod.rs +++ b/src/librand/distributions/mod.rs @@ -263,7 +263,7 @@ mod tests { use {Rng, Rand}; use super::{RandSample, WeightedChoice, Weighted, Sample, IndependentSample}; - #[derive(PartialEq, Show)] + #[derive(PartialEq, Debug)] struct ConstRand(uint); impl Rand for ConstRand { fn rand<R: Rng>(_: &mut R) -> ConstRand { diff --git a/src/librbml/lib.rs b/src/librbml/lib.rs index da35eef6347..f7fd8889fae 100644 --- a/src/librbml/lib.rs +++ b/src/librbml/lib.rs @@ -77,7 +77,7 @@ pub struct TaggedDoc<'a> { pub doc: Doc<'a>, } -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub enum EbmlEncoderTag { EsUint, // 0 EsU64, // 1 @@ -111,7 +111,7 @@ pub enum EbmlEncoderTag { EsLabel, // Used only when debugging } -#[derive(Show)] +#[derive(Debug)] pub enum Error { IntTooBig(uint), Expected(String), diff --git a/src/librustc/lint/mod.rs b/src/librustc/lint/mod.rs index a4a3f485af1..5dc23d27ee1 100644 --- a/src/librustc/lint/mod.rs +++ b/src/librustc/lint/mod.rs @@ -40,7 +40,7 @@ use syntax::ast; pub use lint::context::{Context, LintStore, raw_emit_lint, check_crate, gather_attrs}; /// Specification of a single lint. -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub struct Lint { /// A string identifier for the lint. /// @@ -207,7 +207,7 @@ impl LintId { } /// Setting for how to handle a lint. -#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Show)] +#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug)] pub enum Level { Allow, Warn, Deny, Forbid } diff --git a/src/librustc/metadata/common.rs b/src/librustc/metadata/common.rs index 0ca3e2595ab..aa2be7153ad 100644 --- a/src/librustc/metadata/common.rs +++ b/src/librustc/metadata/common.rs @@ -219,7 +219,7 @@ pub const tag_items_data_item_stability: uint = 0x92; pub const tag_items_data_item_repr: uint = 0x93; -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub struct LinkMeta { pub crate_name: String, pub crate_hash: Svh, diff --git a/src/librustc/metadata/cstore.rs b/src/librustc/metadata/cstore.rs index 7b7159da438..40242f52493 100644 --- a/src/librustc/metadata/cstore.rs +++ b/src/librustc/metadata/cstore.rs @@ -49,7 +49,7 @@ pub struct crate_metadata { pub span: Span, } -#[derive(Copy, Show, PartialEq, Clone)] +#[derive(Copy, Debug, PartialEq, Clone)] pub enum LinkagePreference { RequireDynamic, RequireStatic, diff --git a/src/librustc/metadata/decoder.rs b/src/librustc/metadata/decoder.rs index e6f76dedca9..b70c3ab0b8c 100644 --- a/src/librustc/metadata/decoder.rs +++ b/src/librustc/metadata/decoder.rs @@ -493,7 +493,7 @@ pub fn get_symbol(data: &[u8], id: ast::NodeId) -> String { } // Something that a name can resolve to. -#[derive(Copy, Clone, Show)] +#[derive(Copy, Clone, Debug)] pub enum DefLike { DlDef(def::Def), DlImpl(ast::DefId), diff --git a/src/librustc/metadata/tydecode.rs b/src/librustc/metadata/tydecode.rs index 51252a342a5..943479ff35e 100644 --- a/src/librustc/metadata/tydecode.rs +++ b/src/librustc/metadata/tydecode.rs @@ -43,7 +43,7 @@ use syntax::parse::token; // def-id will depend on where it originated from. Therefore, the conversion // function is given an indicator of the source of the def-id. See // astencode.rs for more information. -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub enum DefIdSource { // Identifies a struct, trait, enum, etc. NominalType, diff --git a/src/librustc/middle/dataflow.rs b/src/librustc/middle/dataflow.rs index 7b3530c129a..01d42523f35 100644 --- a/src/librustc/middle/dataflow.rs +++ b/src/librustc/middle/dataflow.rs @@ -28,7 +28,7 @@ use syntax::visit; use syntax::print::{pp, pprust}; use util::nodemap::NodeMap; -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub enum EntryOrExit { Entry, Exit, diff --git a/src/librustc/middle/def.rs b/src/librustc/middle/def.rs index 2043dde72f4..7857bcad813 100644 --- a/src/librustc/middle/def.rs +++ b/src/librustc/middle/def.rs @@ -20,7 +20,7 @@ use syntax::ast_util::local_def; use std::cell::RefCell; -#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum Def { DefFn(ast::DefId, bool /* is_ctor */), DefStaticMethod(/* method */ ast::DefId, MethodProvenance), @@ -72,13 +72,13 @@ pub struct Export { pub def_id: ast::DefId, // The definition of the target. } -#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum MethodProvenance { FromTrait(ast::DefId), FromImpl(ast::DefId), } -#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum TyParamProvenance { FromSelf(ast::DefId), FromParam(ast::DefId), diff --git a/src/librustc/middle/expr_use_visitor.rs b/src/librustc/middle/expr_use_visitor.rs index 430381696c0..0d543ca7beb 100644 --- a/src/librustc/middle/expr_use_visitor.rs +++ b/src/librustc/middle/expr_use_visitor.rs @@ -95,7 +95,7 @@ pub trait Delegate<'tcx> { mode: MutateMode); } -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub enum LoanCause { ClosureCapture(Span), AddrOf, @@ -107,20 +107,20 @@ pub enum LoanCause { MatchDiscriminant } -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub enum ConsumeMode { Copy, // reference to x where x has a type that copies Move(MoveReason), // reference to x where x has a type that moves } -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub enum MoveReason { DirectRefMove, PatBindingMove, CaptureMove, } -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub enum MatchMode { NonBindingMatch, BorrowingMatch, @@ -128,7 +128,7 @@ pub enum MatchMode { MovingMatch, } -#[derive(PartialEq,Show)] +#[derive(PartialEq,Debug)] enum TrackMatchMode<T> { Unknown, Definite(MatchMode), @@ -197,7 +197,7 @@ impl<T> TrackMatchMode<T> { } } -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub enum MutateMode { Init, JustWrite, // x = y diff --git a/src/librustc/middle/graph.rs b/src/librustc/middle/graph.rs index affeef330c4..aca4b3df453 100644 --- a/src/librustc/middle/graph.rs +++ b/src/librustc/middle/graph.rs @@ -61,18 +61,18 @@ impl<E: Debug> Debug for Edge<E> { } } -#[derive(Clone, Copy, PartialEq, Show)] +#[derive(Clone, Copy, PartialEq, Debug)] pub struct NodeIndex(pub uint); #[allow(non_upper_case_globals)] pub const InvalidNodeIndex: NodeIndex = NodeIndex(uint::MAX); -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub struct EdgeIndex(pub uint); #[allow(non_upper_case_globals)] pub const InvalidEdgeIndex: EdgeIndex = EdgeIndex(uint::MAX); // Use a private field here to guarantee no more instances are created: -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub struct Direction { repr: uint } #[allow(non_upper_case_globals)] pub const Outgoing: Direction = Direction { repr: 0 }; diff --git a/src/librustc/middle/infer/mod.rs b/src/librustc/middle/infer/mod.rs index b626c8b7ee2..cfcead51f78 100644 --- a/src/librustc/middle/infer/mod.rs +++ b/src/librustc/middle/infer/mod.rs @@ -95,7 +95,7 @@ pub type SkolemizationMap = FnvHashMap<ty::BoundRegion,ty::Region>; /// Why did we require that the two types be related? /// /// See `error_reporting.rs` for more details -#[derive(Clone, Copy, Show)] +#[derive(Clone, Copy, Debug)] pub enum TypeOrigin { // Not yet categorized in a better way Misc(Span), @@ -133,7 +133,7 @@ pub enum TypeOrigin { } /// See `error_reporting.rs` for more details -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub enum ValuePairs<'tcx> { Types(ty::expected_found<Ty<'tcx>>), TraitRefs(ty::expected_found<Rc<ty::TraitRef<'tcx>>>), @@ -144,7 +144,7 @@ pub enum ValuePairs<'tcx> { /// encounter an error or subtyping constraint. /// /// See `error_reporting.rs` for more details. -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub struct TypeTrace<'tcx> { origin: TypeOrigin, values: ValuePairs<'tcx>, @@ -153,7 +153,7 @@ pub struct TypeTrace<'tcx> { /// The origin of a `r1 <= r2` constraint. /// /// See `error_reporting.rs` for more details -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub enum SubregionOrigin<'tcx> { // Arose from a subtyping relation Subtype(TypeTrace<'tcx>), @@ -222,7 +222,7 @@ pub enum SubregionOrigin<'tcx> { } /// Times when we replace late-bound regions with variables: -#[derive(Clone, Copy, Show)] +#[derive(Clone, Copy, Debug)] pub enum LateBoundRegionConversionTime { /// when a fn is called FnCall, @@ -237,7 +237,7 @@ pub enum LateBoundRegionConversionTime { /// Reasons to create a region inference variable /// /// See `error_reporting.rs` for more details -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub enum RegionVariableOrigin<'tcx> { // Region variables created for ill-categorized reasons, // mostly indicates places in need of refactoring @@ -270,7 +270,7 @@ pub enum RegionVariableOrigin<'tcx> { BoundRegionInCoherence(ast::Name), } -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub enum fixup_err { unresolved_int_ty(IntVid), unresolved_float_ty(FloatVid), diff --git a/src/librustc/middle/infer/region_inference/graphviz.rs b/src/librustc/middle/infer/region_inference/graphviz.rs index 8803fe7cf38..215c4945ea9 100644 --- a/src/librustc/middle/infer/region_inference/graphviz.rs +++ b/src/librustc/middle/infer/region_inference/graphviz.rs @@ -120,7 +120,7 @@ struct ConstraintGraph<'a, 'tcx: 'a> { node_ids: FnvHashMap<Node, uint>, } -#[derive(Clone, Hash, PartialEq, Eq, Show)] +#[derive(Clone, Hash, PartialEq, Eq, Debug)] enum Node { RegionVid(ty::RegionVid), Region(ty::Region), diff --git a/src/librustc/middle/infer/region_inference/mod.rs b/src/librustc/middle/infer/region_inference/mod.rs index 6a69fc5647c..052e7dbb3a4 100644 --- a/src/librustc/middle/infer/region_inference/mod.rs +++ b/src/librustc/middle/infer/region_inference/mod.rs @@ -42,7 +42,7 @@ mod doc; mod graphviz; // A constraint that influences the inference process. -#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)] pub enum Constraint { // One region variable is subregion of another ConstrainVarSubVar(RegionVid, RegionVid), @@ -69,7 +69,7 @@ pub enum Verify<'tcx> { VerifyGenericBound(GenericKind<'tcx>, SubregionOrigin<'tcx>, Region, Vec<Region>), } -#[derive(Clone, Show, PartialEq, Eq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub enum GenericKind<'tcx> { Param(ty::ParamTy), Projection(ty::ProjectionTy<'tcx>), @@ -97,7 +97,7 @@ pub enum CombineMapType { Lub, Glb } -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub enum RegionResolutionError<'tcx> { /// `ConcreteFailure(o, a, b)`: /// @@ -149,7 +149,7 @@ pub enum RegionResolutionError<'tcx> { /// ``` /// would report an error because we expect 'a and 'b to match, and so we group /// 'a and 'b together inside a SameRegions struct -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub struct SameRegions { pub scope_id: ast::NodeId, pub regions: Vec<BoundRegion> @@ -223,7 +223,7 @@ pub struct RegionVarBindings<'a, 'tcx: 'a> { values: RefCell<Option<Vec<VarValue>>>, } -#[derive(Show)] +#[derive(Debug)] #[allow(missing_copy_implementations)] pub struct RegionSnapshot { length: uint, @@ -943,7 +943,7 @@ impl<'a, 'tcx> RegionVarBindings<'a, 'tcx> { // ______________________________________________________________________ -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] enum Classification { Expanding, Contracting } #[derive(Copy)] diff --git a/src/librustc/middle/infer/type_variable.rs b/src/librustc/middle/infer/type_variable.rs index 4bbc5035799..65061a29b78 100644 --- a/src/librustc/middle/infer/type_variable.rs +++ b/src/librustc/middle/infer/type_variable.rs @@ -46,7 +46,7 @@ struct Delegate<'tcx>; type Relation = (RelationDir, ty::TyVid); -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub enum RelationDir { SubtypeOf, SupertypeOf, EqTo } diff --git a/src/librustc/middle/infer/unify.rs b/src/librustc/middle/infer/unify.rs index e15eb9c0576..923f7d2d4ef 100644 --- a/src/librustc/middle/infer/unify.rs +++ b/src/librustc/middle/infer/unify.rs @@ -63,7 +63,7 @@ pub trait UnifyValue : Clone + PartialEq + Debug { /// to keep the DAG relatively balanced, which helps keep the running /// time of the algorithm under control. For more information, see /// <http://en.wikipedia.org/wiki/Disjoint-set_data_structure>. -#[derive(PartialEq,Clone,Show)] +#[derive(PartialEq,Clone,Debug)] pub enum VarValue<K:UnifyKey> { Redirect(K), Root(K::Value, uint), diff --git a/src/librustc/middle/liveness.rs b/src/librustc/middle/liveness.rs index 67609402649..f6a51004eb6 100644 --- a/src/librustc/middle/liveness.rs +++ b/src/librustc/middle/liveness.rs @@ -159,7 +159,7 @@ impl Clone for LiveNode { } } -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] enum LiveNodeKind { FreeVarNode(Span), ExprNode(Span), @@ -245,13 +245,13 @@ struct CaptureInfo { var_nid: NodeId } -#[derive(Copy, Show)] +#[derive(Copy, Debug)] struct LocalInfo { id: NodeId, ident: ast::Ident } -#[derive(Copy, Show)] +#[derive(Copy, Debug)] enum VarKind { Arg(NodeId, ast::Ident), Local(LocalInfo), diff --git a/src/librustc/middle/mem_categorization.rs b/src/librustc/middle/mem_categorization.rs index b7f07a87419..1be1bfa6730 100644 --- a/src/librustc/middle/mem_categorization.rs +++ b/src/librustc/middle/mem_categorization.rs @@ -87,7 +87,7 @@ use syntax::parse::token; use std::cell::RefCell; use std::rc::Rc; -#[derive(Clone, PartialEq, Show)] +#[derive(Clone, PartialEq, Debug)] pub enum categorization<'tcx> { cat_rvalue(ty::Region), // temporary val, argument is its scope cat_static_item, @@ -101,14 +101,14 @@ pub enum categorization<'tcx> { } // Represents any kind of upvar -#[derive(Clone, Copy, PartialEq, Show)] +#[derive(Clone, Copy, PartialEq, Debug)] pub struct Upvar { pub id: ty::UpvarId, pub kind: ty::ClosureKind } // different kinds of pointers: -#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)] pub enum PointerKind { /// `Box<T>` Unique, @@ -125,25 +125,25 @@ pub enum PointerKind { // We use the term "interior" to mean "something reachable from the // base without a pointer dereference", e.g. a field -#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)] pub enum InteriorKind { InteriorField(FieldName), InteriorElement(ElementKind), } -#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)] pub enum FieldName { NamedField(ast::Name), PositionalField(uint) } -#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)] pub enum ElementKind { VecElement, OtherElement, } -#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)] pub enum MutabilityCategory { McImmutable, // Immutable. McDeclared, // Directly declared as mutable. @@ -155,7 +155,7 @@ pub enum MutabilityCategory { // Upvar categorization can generate a variable number of nested // derefs. The note allows detecting them without deep pattern // matching on the categorization. -#[derive(Clone, Copy, PartialEq, Show)] +#[derive(Clone, Copy, PartialEq, Debug)] pub enum Note { NoteClosureEnv(ty::UpvarId), // Deref through closure env NoteUpvarRef(ty::UpvarId), // Deref through by-ref upvar @@ -176,7 +176,7 @@ pub enum Note { // dereference, but its type is the type *before* the dereference // (`@T`). So use `cmt.ty` to find the type of the value in a consistent // fashion. For more details, see the method `cat_pattern` -#[derive(Clone, PartialEq, Show)] +#[derive(Clone, PartialEq, Debug)] pub struct cmt_<'tcx> { pub id: ast::NodeId, // id of expr/pat producing this value pub span: Span, // span of same expr/pat diff --git a/src/librustc/middle/privacy.rs b/src/librustc/middle/privacy.rs index 74797dfd77a..dd1e32d13a2 100644 --- a/src/librustc/middle/privacy.rs +++ b/src/librustc/middle/privacy.rs @@ -35,7 +35,7 @@ pub type PublicItems = NodeSet; // FIXME: dox pub type LastPrivateMap = NodeMap<LastPrivate>; -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub enum LastPrivate { LastMod(PrivateDep), // `use` directives (imports) can refer to two separate definitions in the @@ -49,14 +49,14 @@ pub enum LastPrivate { type_used: ImportUse}, } -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub enum PrivateDep { AllPublic, DependsOn(ast::DefId), } // How an import is used. -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub enum ImportUse { Unused, // The import is not used. Used, // The import is used. diff --git a/src/librustc/middle/region.rs b/src/librustc/middle/region.rs index 9bba01f8af7..4e29e9b75e8 100644 --- a/src/librustc/middle/region.rs +++ b/src/librustc/middle/region.rs @@ -37,7 +37,7 @@ use syntax::visit::{Visitor, FnKind}; /// actually attach a more meaningful ordering to scopes than the one /// generated via deriving here. #[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash, RustcEncodable, - RustcDecodable, Show, Copy)] + RustcDecodable, Debug, Copy)] pub enum CodeExtent { Misc(ast::NodeId), Remainder(BlockRemainder), @@ -61,7 +61,7 @@ pub enum CodeExtent { /// * the subscope with `first_statement_index == 1` is scope of `c`, /// and thus does not include EXPR_2, but covers the `...`. #[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash, RustcEncodable, - RustcDecodable, Show, Copy)] + RustcDecodable, Debug, Copy)] pub struct BlockRemainder { pub block: ast::NodeId, pub first_statement_index: uint, @@ -179,7 +179,7 @@ pub struct RegionMaps { /// Carries the node id for the innermost block or match expression, /// for building up the `var_map` which maps ids to the blocks in /// which they were declared. -#[derive(PartialEq, Eq, Show, Copy)] +#[derive(PartialEq, Eq, Debug, Copy)] enum InnermostDeclaringBlock { None, Block(ast::NodeId), @@ -204,7 +204,7 @@ impl InnermostDeclaringBlock { /// Contextual information for declarations introduced by a statement /// (i.e. `let`). It carries node-id's for statement and enclosing /// block both, as well as the statement's index within the block. -#[derive(PartialEq, Eq, Show, Copy)] +#[derive(PartialEq, Eq, Debug, Copy)] struct DeclaringStatementContext { stmt_id: ast::NodeId, block_id: ast::NodeId, @@ -220,7 +220,7 @@ impl DeclaringStatementContext { } } -#[derive(PartialEq, Eq, Show, Copy)] +#[derive(PartialEq, Eq, Debug, Copy)] enum InnermostEnclosingExpr { None, Some(ast::NodeId), @@ -242,7 +242,7 @@ impl InnermostEnclosingExpr { } } -#[derive(Show, Copy)] +#[derive(Debug, Copy)] pub struct Context { var_parent: InnermostDeclaringBlock, diff --git a/src/librustc/middle/resolve_lifetime.rs b/src/librustc/middle/resolve_lifetime.rs index 14e553f77dc..9433f7b0a70 100644 --- a/src/librustc/middle/resolve_lifetime.rs +++ b/src/librustc/middle/resolve_lifetime.rs @@ -33,7 +33,7 @@ use syntax::visit; use syntax::visit::Visitor; use util::nodemap::NodeMap; -#[derive(Clone, Copy, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Debug)] pub enum DefRegion { DefStaticRegion, DefEarlyBoundRegion(/* space */ subst::ParamSpace, diff --git a/src/librustc/middle/subst.rs b/src/librustc/middle/subst.rs index 889d8b4052f..cbf65080a86 100644 --- a/src/librustc/middle/subst.rs +++ b/src/librustc/middle/subst.rs @@ -28,7 +28,7 @@ use syntax::codemap::{Span, DUMMY_SP}; /// identify each in-scope parameter by an *index* and a *parameter /// space* (which indices where the parameter is defined; see /// `ParamSpace`). -#[derive(Clone, PartialEq, Eq, Hash, Show)] +#[derive(Clone, PartialEq, Eq, Hash, Debug)] pub struct Substs<'tcx> { pub types: VecPerParamSpace<Ty<'tcx>>, pub regions: RegionSubsts, @@ -37,7 +37,7 @@ pub struct Substs<'tcx> { /// Represents the values to use when substituting lifetime parameters. /// If the value is `ErasedRegions`, then this subst is occurring during /// trans, and all region parameters will be replaced with `ty::ReStatic`. -#[derive(Clone, PartialEq, Eq, Hash, Show)] +#[derive(Clone, PartialEq, Eq, Hash, Debug)] pub enum RegionSubsts { ErasedRegions, NonerasedRegions(VecPerParamSpace<ty::Region>) @@ -180,7 +180,7 @@ impl RegionSubsts { // ParamSpace #[derive(PartialOrd, Ord, PartialEq, Eq, Copy, - Clone, Hash, RustcEncodable, RustcDecodable, Show)] + Clone, Hash, RustcEncodable, RustcDecodable, Debug)] pub enum ParamSpace { TypeSpace, // Type parameters attached to a type definition, trait, or impl SelfSpace, // Self parameter on a trait diff --git a/src/librustc/middle/traits/mod.rs b/src/librustc/middle/traits/mod.rs index 82a4a60cebb..94da688181e 100644 --- a/src/librustc/middle/traits/mod.rs +++ b/src/librustc/middle/traits/mod.rs @@ -147,7 +147,7 @@ pub type TraitObligations<'tcx> = subst::VecPerParamSpace<TraitObligation<'tcx>> pub type Selection<'tcx> = Vtable<'tcx, PredicateObligation<'tcx>>; -#[derive(Clone,Show)] +#[derive(Clone,Debug)] pub enum SelectionError<'tcx> { Unimplemented, Overflow, @@ -215,7 +215,7 @@ pub type SelectionResult<'tcx, T> = Result<Option<T>, SelectionError<'tcx>>; /// ### The type parameter `N` /// /// See explanation on `VtableImplData`. -#[derive(Show,Clone)] +#[derive(Debug,Clone)] pub enum Vtable<'tcx, N> { /// Vtable identifying a particular impl. VtableImpl(VtableImplData<'tcx, N>), @@ -258,7 +258,7 @@ pub struct VtableImplData<'tcx, N> { pub nested: subst::VecPerParamSpace<N> } -#[derive(Show,Clone)] +#[derive(Debug,Clone)] pub struct VtableBuiltinData<N> { pub nested: subst::VecPerParamSpace<N> } diff --git a/src/librustc/middle/traits/object_safety.rs b/src/librustc/middle/traits/object_safety.rs index 56c1419502f..530190ddfc1 100644 --- a/src/librustc/middle/traits/object_safety.rs +++ b/src/librustc/middle/traits/object_safety.rs @@ -36,7 +36,7 @@ pub enum ObjectSafetyViolation<'tcx> { } /// Reasons a method might not be object-safe. -#[derive(Copy,Clone,Show)] +#[derive(Copy,Clone,Debug)] pub enum MethodViolationCode { /// e.g., `fn(self)` ByValueSelf, diff --git a/src/librustc/middle/traits/select.rs b/src/librustc/middle/traits/select.rs index 8005da507dc..5780b5b70f4 100644 --- a/src/librustc/middle/traits/select.rs +++ b/src/librustc/middle/traits/select.rs @@ -96,7 +96,7 @@ pub enum MethodMatchResult { MethodDidNotMatch, } -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub enum MethodMatchedData { // In the case of a precise match, we don't really need to store // how the match was found. So don't. @@ -131,7 +131,7 @@ pub enum MethodMatchedData { /// matching where clause. Part of the reason for this is that where /// clauses can give additional information (like, the types of output /// parameters) that would have to be inferred from the impl. -#[derive(PartialEq,Eq,Show,Clone)] +#[derive(PartialEq,Eq,Debug,Clone)] enum SelectionCandidate<'tcx> { BuiltinCandidate(ty::BuiltinBound), ParamCandidate(ty::PolyTraitRef<'tcx>), @@ -172,7 +172,7 @@ enum BuiltinBoundConditions<'tcx> { AmbiguousBuiltin } -#[derive(Show)] +#[derive(Debug)] enum EvaluationResult<'tcx> { EvaluatedToOk, EvaluatedToAmbig, diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index 2ca4fd7a0d6..88d6fd9d45d 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -112,7 +112,7 @@ pub struct field<'tcx> { pub mt: mt<'tcx> } -#[derive(Clone, Copy, Show)] +#[derive(Clone, Copy, Debug)] pub enum ImplOrTraitItemContainer { TraitContainer(ast::DefId), ImplContainer(ast::DefId), @@ -127,7 +127,7 @@ impl ImplOrTraitItemContainer { } } -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub enum ImplOrTraitItem<'tcx> { MethodTraitItem(Rc<Method<'tcx>>), TypeTraitItem(Rc<AssociatedType>), @@ -172,7 +172,7 @@ impl<'tcx> ImplOrTraitItem<'tcx> { } } -#[derive(Clone, Copy, Show)] +#[derive(Clone, Copy, Debug)] pub enum ImplOrTraitItemId { MethodTraitItemId(ast::DefId), TypeTraitItemId(ast::DefId), @@ -187,7 +187,7 @@ impl ImplOrTraitItemId { } } -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub struct Method<'tcx> { pub name: ast::Name, pub generics: ty::Generics<'tcx>, @@ -231,7 +231,7 @@ impl<'tcx> Method<'tcx> { } } -#[derive(Clone, Copy, Show)] +#[derive(Clone, Copy, Debug)] pub struct AssociatedType { pub name: ast::Name, pub vis: ast::Visibility, @@ -239,13 +239,13 @@ pub struct AssociatedType { pub container: ImplOrTraitItemContainer, } -#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)] pub struct mt<'tcx> { pub ty: Ty<'tcx>, pub mutbl: ast::Mutability, } -#[derive(Clone, Copy, Show)] +#[derive(Clone, Copy, Debug)] pub struct field_ty { pub name: Name, pub id: DefId, @@ -274,7 +274,7 @@ pub struct ItemVariances { pub regions: VecPerParamSpace<Variance>, } -#[derive(Clone, PartialEq, RustcDecodable, RustcEncodable, Show, Copy)] +#[derive(Clone, PartialEq, RustcDecodable, RustcEncodable, Debug, Copy)] pub enum Variance { Covariant, // T<A> <: T<B> iff A <: B -- e.g., function return type Invariant, // T<A> <: T<B> iff B == A -- e.g., type of mutable cell @@ -282,13 +282,13 @@ pub enum Variance { Bivariant, // T<A> <: T<B> -- e.g., unused type parameter } -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub enum AutoAdjustment<'tcx> { AdjustReifyFnPointer(ast::DefId), // go from a fn-item type to a fn-pointer type AdjustDerefRef(AutoDerefRef<'tcx>) } -#[derive(Clone, PartialEq, Show)] +#[derive(Clone, PartialEq, Debug)] pub enum UnsizeKind<'tcx> { // [T, ..n] -> [T], the uint field is n. UnsizeLength(uint), @@ -298,13 +298,13 @@ pub enum UnsizeKind<'tcx> { UnsizeVtable(TyTrait<'tcx>, /* the self type of the trait */ Ty<'tcx>) } -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub struct AutoDerefRef<'tcx> { pub autoderefs: uint, pub autoref: Option<AutoRef<'tcx>> } -#[derive(Clone, PartialEq, Show)] +#[derive(Clone, PartialEq, Debug)] pub enum AutoRef<'tcx> { /// Convert from T to &T /// The third field allows us to wrap other AutoRef adjustments. @@ -421,13 +421,13 @@ pub fn type_of_adjust<'tcx>(cx: &ctxt<'tcx>, adj: &AutoAdjustment<'tcx>) -> Opti } } -#[derive(Clone, Copy, RustcEncodable, RustcDecodable, PartialEq, PartialOrd, Show)] +#[derive(Clone, Copy, RustcEncodable, RustcDecodable, PartialEq, PartialOrd, Debug)] pub struct param_index { pub space: subst::ParamSpace, pub index: uint } -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub enum MethodOrigin<'tcx> { // fully statically resolved method MethodStatic(ast::DefId), @@ -445,7 +445,7 @@ pub enum MethodOrigin<'tcx> { // details for a method invoked with a receiver whose type is a type parameter // with a bounded trait. -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub struct MethodParam<'tcx> { // the precise trait reference that occurs as a bound -- this may // be a supertrait of what the user actually typed. Note that it @@ -466,7 +466,7 @@ pub struct MethodParam<'tcx> { } // details for a method invoked with a receiver whose type is an object -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub struct MethodObject<'tcx> { // the (super)trait containing the method to be invoked pub trait_ref: Rc<ty::TraitRef<'tcx>>, @@ -503,13 +503,13 @@ pub struct MethodCallee<'tcx> { /// needed to add to the side tables. Thus to disambiguate /// we also keep track of whether there's an adjustment in /// our key. -#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)] pub struct MethodCall { pub expr_id: ast::NodeId, pub adjustment: ExprAdjustment } -#[derive(Clone, PartialEq, Eq, Hash, Show, RustcEncodable, RustcDecodable, Copy)] +#[derive(Clone, PartialEq, Eq, Hash, Debug, RustcEncodable, RustcDecodable, Copy)] pub enum ExprAdjustment { NoAdjustment, AutoDeref(uint), @@ -923,7 +923,7 @@ impl<'tcx> ctxt<'tcx> { } } -#[derive(Show)] +#[derive(Debug)] pub struct TyS<'tcx> { pub sty: sty<'tcx>, pub flags: TypeFlags, @@ -1029,21 +1029,21 @@ pub fn type_escapes_depth(ty: Ty, depth: u32) -> bool { ty.region_depth > depth } -#[derive(Clone, PartialEq, Eq, Hash, Show)] +#[derive(Clone, PartialEq, Eq, Hash, Debug)] pub struct BareFnTy<'tcx> { pub unsafety: ast::Unsafety, pub abi: abi::Abi, pub sig: PolyFnSig<'tcx>, } -#[derive(Clone, PartialEq, Eq, Hash, Show)] +#[derive(Clone, PartialEq, Eq, Hash, Debug)] pub struct ClosureTy<'tcx> { pub unsafety: ast::Unsafety, pub abi: abi::Abi, pub sig: PolyFnSig<'tcx>, } -#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)] pub enum FnOutput<'tcx> { FnConverging(Ty<'tcx>), FnDiverging @@ -1100,7 +1100,7 @@ impl<'tcx> PolyFnSig<'tcx> { } } -#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)] pub struct ParamTy { pub space: subst::ParamSpace, pub idx: u32, @@ -1146,7 +1146,7 @@ pub struct ParamTy { /// is the outer fn. /// /// [dbi]: http://en.wikipedia.org/wiki/De_Bruijn_index -#[derive(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Show, Copy)] +#[derive(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Debug, Copy)] pub struct DebruijnIndex { // We maintain the invariant that this is never 0. So 1 indicates // the innermost binder. To ensure this, create with `DebruijnIndex::new`. @@ -1154,7 +1154,7 @@ pub struct DebruijnIndex { } /// Representation of regions: -#[derive(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Show, Copy)] +#[derive(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Debug, Copy)] pub enum Region { // Region bound in a type or fn declaration which will be // substituted 'early' -- that is, at the same time when type @@ -1195,13 +1195,13 @@ pub enum Region { /// Upvars do not get their own node-id. Instead, we use the pair of /// the original var id (that is, the root variable that is referenced /// by the upvar) and the id of the closure expression. -#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)] pub struct UpvarId { pub var_id: ast::NodeId, pub closure_expr_id: ast::NodeId, } -#[derive(Clone, PartialEq, Eq, Hash, Show, RustcEncodable, RustcDecodable, Copy)] +#[derive(Clone, PartialEq, Eq, Hash, Debug, RustcEncodable, RustcDecodable, Copy)] pub enum BorrowKind { /// Data must be immutable and is aliasable. ImmBorrow, @@ -1294,7 +1294,7 @@ pub enum BorrowKind { /// - Through mutation, the borrowed upvars can actually escape /// the closure, so sometimes it is necessary for them to be larger /// than the closure lifetime itself. -#[derive(PartialEq, Clone, RustcEncodable, RustcDecodable, Show, Copy)] +#[derive(PartialEq, Clone, RustcEncodable, RustcDecodable, Debug, Copy)] pub struct UpvarBorrow { pub kind: BorrowKind, pub region: ty::Region, @@ -1320,7 +1320,7 @@ impl Region { } #[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash, - RustcEncodable, RustcDecodable, Show, Copy)] + RustcEncodable, RustcDecodable, Debug, Copy)] /// A "free" region `fr` can be interpreted as "some region /// at least as big as the scope `fr.scope`". pub struct FreeRegion { @@ -1329,7 +1329,7 @@ pub struct FreeRegion { } #[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash, - RustcEncodable, RustcDecodable, Show, Copy)] + RustcEncodable, RustcDecodable, Debug, Copy)] pub enum BoundRegion { /// An anonymous region parameter for a given fn (&T) BrAnon(u32), @@ -1350,7 +1350,7 @@ pub enum BoundRegion { // NB: If you change this, you'll probably want to change the corresponding // AST structure in libsyntax/ast.rs as well. -#[derive(Clone, PartialEq, Eq, Hash, Show)] +#[derive(Clone, PartialEq, Eq, Hash, Debug)] pub enum sty<'tcx> { ty_bool, ty_char, @@ -1397,7 +1397,7 @@ pub enum sty<'tcx> { // on non-useful type error messages) } -#[derive(Clone, PartialEq, Eq, Hash, Show)] +#[derive(Clone, PartialEq, Eq, Hash, Debug)] pub struct TyTrait<'tcx> { pub principal: ty::PolyTraitRef<'tcx>, pub bounds: ExistentialBounds<'tcx>, @@ -1469,7 +1469,7 @@ impl<'tcx> TyTrait<'tcx> { /// Note that a `TraitRef` introduces a level of region binding, to /// account for higher-ranked trait bounds like `T : for<'a> Foo<&'a /// U>` or higher-ranked object types. -#[derive(Clone, PartialEq, Eq, Hash, Show)] +#[derive(Clone, PartialEq, Eq, Hash, Debug)] pub struct TraitRef<'tcx> { pub def_id: DefId, pub substs: &'tcx Substs<'tcx>, @@ -1509,7 +1509,7 @@ impl<'tcx> PolyTraitRef<'tcx> { /// erase, or otherwise "discharge" these bound reons, we change the /// type from `Binder<T>` to just `T` (see /// e.g. `liberate_late_bound_regions`). -#[derive(Clone, PartialEq, Eq, Hash, Show)] +#[derive(Clone, PartialEq, Eq, Hash, Debug)] pub struct Binder<T>(pub T); #[derive(Clone, Copy, PartialEq)] @@ -1518,7 +1518,7 @@ pub enum IntVarValue { UintType(ast::UintTy), } -#[derive(Clone, Copy, Show)] +#[derive(Clone, Copy, Debug)] pub enum terr_vstore_kind { terr_vec, terr_str, @@ -1526,14 +1526,14 @@ pub enum terr_vstore_kind { terr_trait } -#[derive(Clone, Copy, Show)] +#[derive(Clone, Copy, Debug)] pub struct expected_found<T> { pub expected: T, pub found: T } // Data structures used in type unification -#[derive(Clone, Copy, Show)] +#[derive(Clone, Copy, Debug)] pub enum type_err<'tcx> { terr_mismatch, terr_unsafety_mismatch(expected_found<ast::Unsafety>), @@ -1567,7 +1567,7 @@ pub enum type_err<'tcx> { /// Bounds suitable for a named type parameter like `A` in `fn foo<A>` /// as well as the existential type parameter in an object type. -#[derive(PartialEq, Eq, Hash, Clone, Show)] +#[derive(PartialEq, Eq, Hash, Clone, Debug)] pub struct ParamBounds<'tcx> { pub region_bounds: Vec<ty::Region>, pub builtin_bounds: BuiltinBounds, @@ -1580,7 +1580,7 @@ pub struct ParamBounds<'tcx> { /// major difference between this case and `ParamBounds` is that /// general purpose trait bounds are omitted and there must be /// *exactly one* region. -#[derive(PartialEq, Eq, Hash, Clone, Show)] +#[derive(PartialEq, Eq, Hash, Clone, Debug)] pub struct ExistentialBounds<'tcx> { pub region_bound: ty::Region, pub builtin_bounds: BuiltinBounds, @@ -1590,7 +1590,7 @@ pub struct ExistentialBounds<'tcx> { pub type BuiltinBounds = EnumSet<BuiltinBound>; #[derive(Clone, RustcEncodable, PartialEq, Eq, RustcDecodable, Hash, - Show, Copy)] + Debug, Copy)] #[repr(uint)] pub enum BuiltinBound { BoundSend, @@ -1664,7 +1664,7 @@ pub enum InferTy { FreshIntTy(u32), } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)] pub enum UnconstrainedNumeric { UnconstrainedFloat, UnconstrainedInt, @@ -1672,7 +1672,7 @@ pub enum UnconstrainedNumeric { } -#[derive(Clone, RustcEncodable, RustcDecodable, Eq, Hash, Show, Copy)] +#[derive(Clone, RustcEncodable, RustcDecodable, Eq, Hash, Debug, Copy)] pub enum InferRegion { ReVar(RegionVid), ReSkolemized(u32, BoundRegion) @@ -1746,7 +1746,7 @@ impl fmt::Debug for IntVarValue { } } -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub struct TypeParameterDef<'tcx> { pub name: ast::Name, pub def_id: ast::DefId, @@ -1756,7 +1756,7 @@ pub struct TypeParameterDef<'tcx> { pub default: Option<Ty<'tcx>>, } -#[derive(RustcEncodable, RustcDecodable, Clone, Show)] +#[derive(RustcEncodable, RustcDecodable, Clone, Debug)] pub struct RegionParameterDef { pub name: ast::Name, pub def_id: ast::DefId, @@ -1773,7 +1773,7 @@ impl RegionParameterDef { /// Information about the formal type/lifetime parameters associated /// with an item or method. Analogous to ast::Generics. -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub struct Generics<'tcx> { pub types: VecPerParamSpace<TypeParameterDef<'tcx>>, pub regions: VecPerParamSpace<RegionParameterDef>, @@ -1809,7 +1809,7 @@ impl<'tcx> Generics<'tcx> { } } -#[derive(Clone, PartialEq, Eq, Hash, Show)] +#[derive(Clone, PartialEq, Eq, Hash, Debug)] pub enum Predicate<'tcx> { /// Corresponds to `where Foo : Bar<A,B,C>`. `Foo` here would be /// the `Self` type of the trait reference and `A`, `B`, and `C` @@ -1830,7 +1830,7 @@ pub enum Predicate<'tcx> { Projection(PolyProjectionPredicate<'tcx>), } -#[derive(Clone, PartialEq, Eq, Hash, Show)] +#[derive(Clone, PartialEq, Eq, Hash, Debug)] pub struct TraitPredicate<'tcx> { pub trait_ref: Rc<TraitRef<'tcx>> } @@ -1856,11 +1856,11 @@ impl<'tcx> PolyTraitPredicate<'tcx> { } } -#[derive(Clone, PartialEq, Eq, Hash, Show)] +#[derive(Clone, PartialEq, Eq, Hash, Debug)] pub struct EquatePredicate<'tcx>(pub Ty<'tcx>, pub Ty<'tcx>); // `0 == 1` pub type PolyEquatePredicate<'tcx> = ty::Binder<EquatePredicate<'tcx>>; -#[derive(Clone, PartialEq, Eq, Hash, Show)] +#[derive(Clone, PartialEq, Eq, Hash, Debug)] pub struct OutlivesPredicate<A,B>(pub A, pub B); // `A : B` pub type PolyOutlivesPredicate<A,B> = ty::Binder<OutlivesPredicate<A,B>>; pub type PolyRegionOutlivesPredicate = PolyOutlivesPredicate<ty::Region, ty::Region>; @@ -1878,7 +1878,7 @@ pub type PolyTypeOutlivesPredicate<'tcx> = PolyOutlivesPredicate<Ty<'tcx>, ty::R /// equality between arbitrary types. Processing an instance of Form /// #2 eventually yields one of these `ProjectionPredicate` /// instances to normalize the LHS. -#[derive(Clone, PartialEq, Eq, Hash, Show)] +#[derive(Clone, PartialEq, Eq, Hash, Debug)] pub struct ProjectionPredicate<'tcx> { pub projection_ty: ProjectionTy<'tcx>, pub ty: Ty<'tcx>, @@ -1898,7 +1898,7 @@ impl<'tcx> PolyProjectionPredicate<'tcx> { /// Represents the projection of an associated type. In explicit UFCS /// form this would be written `<T as Trait<..>>::N`. -#[derive(Clone, PartialEq, Eq, Hash, Show)] +#[derive(Clone, PartialEq, Eq, Hash, Debug)] pub struct ProjectionTy<'tcx> { /// The trait reference `T as Trait<..>`. pub trait_ref: Rc<ty::TraitRef<'tcx>>, @@ -2034,7 +2034,7 @@ impl<'tcx> Predicate<'tcx> { /// `[[], [U:Bar<T>]]`. Now if there were some particular reference /// like `Foo<int,uint>`, then the `GenericBounds` would be `[[], /// [uint:Bar<int>]]`. -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub struct GenericBounds<'tcx> { pub predicates: VecPerParamSpace<Predicate<'tcx>>, } @@ -2243,7 +2243,7 @@ impl<'a, 'tcx> ParameterEnvironment<'a, 'tcx> { /// stray references in a comment or something). We try to reserve the /// "poly" prefix to refer to higher-ranked things, as in /// `PolyTraitRef`. -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub struct TypeScheme<'tcx> { pub generics: Generics<'tcx>, pub ty: Ty<'tcx> @@ -2286,7 +2286,7 @@ pub struct Closure<'tcx> { pub kind: ClosureKind, } -#[derive(Clone, Copy, PartialEq, Eq, Show)] +#[derive(Clone, Copy, PartialEq, Eq, Debug)] pub enum ClosureKind { FnClosureKind, FnMutClosureKind, @@ -3745,7 +3745,7 @@ pub fn is_instantiable<'tcx>(cx: &ctxt<'tcx>, r_ty: Ty<'tcx>) -> bool { /// /// The ordering of the cases is significant. They are sorted so that cmp::max /// will keep the "more erroneous" of two values. -#[derive(Copy, PartialOrd, Ord, Eq, PartialEq, Show)] +#[derive(Copy, PartialOrd, Ord, Eq, PartialEq, Debug)] pub enum Representability { Representable, ContainsRecursive, @@ -6536,7 +6536,7 @@ impl<'a,'tcx> ClosureTyper<'tcx> for ty::ParameterEnvironment<'a,'tcx> { /// The category of explicit self. -#[derive(Clone, Copy, Eq, PartialEq, Show)] +#[derive(Clone, Copy, Eq, PartialEq, Debug)] pub enum ExplicitSelfCategory { StaticExplicitSelfCategory, ByValueExplicitSelfCategory, diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index a2bba313cca..2fc68e6244a 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -249,7 +249,7 @@ pub enum EntryFnType { EntryNone, } -#[derive(Copy, PartialEq, PartialOrd, Clone, Ord, Eq, Hash, Show)] +#[derive(Copy, PartialEq, PartialOrd, Clone, Ord, Eq, Hash, Debug)] pub enum CrateType { CrateTypeExecutable, CrateTypeDylib, @@ -672,7 +672,7 @@ pub fn optgroups() -> Vec<getopts::OptGroup> { .collect() } -#[derive(Copy, Clone, PartialEq, Eq, Show)] +#[derive(Copy, Clone, PartialEq, Eq, Debug)] pub enum OptionStability { Stable, Unstable } #[derive(Clone, PartialEq, Eq)] diff --git a/src/librustc/session/search_paths.rs b/src/librustc/session/search_paths.rs index dfc27d3ae68..c6436d47c73 100644 --- a/src/librustc/session/search_paths.rs +++ b/src/librustc/session/search_paths.rs @@ -10,7 +10,7 @@ use std::slice; -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub struct SearchPaths { paths: Vec<(PathKind, Path)>, } @@ -20,7 +20,7 @@ pub struct Iter<'a> { iter: slice::Iter<'a, (PathKind, Path)>, } -#[derive(Eq, PartialEq, Clone, Copy, Show)] +#[derive(Eq, PartialEq, Clone, Copy, Debug)] pub enum PathKind { Native, Crate, diff --git a/src/librustc/util/common.rs b/src/librustc/util/common.rs index bdb6ea22f8b..cdaca497b90 100644 --- a/src/librustc/util/common.rs +++ b/src/librustc/util/common.rs @@ -27,7 +27,7 @@ pub const FN_OUTPUT_NAME: &'static str = "Output"; // Useful type to use with `Result<>` indicate that an error has already // been reported to the user, so no need to continue checking. -#[derive(Clone, Copy, Show)] +#[derive(Clone, Copy, Debug)] pub struct ErrorReported; pub fn time<T, U, F>(do_it: bool, what: &str, u: U, f: F) -> T where diff --git a/src/librustc_back/svh.rs b/src/librustc_back/svh.rs index 65a7fbf60a5..aef4f7a896b 100644 --- a/src/librustc_back/svh.rs +++ b/src/librustc_back/svh.rs @@ -52,7 +52,7 @@ use std::iter::range_step; use syntax::ast; use syntax::visit; -#[derive(Clone, PartialEq, Show)] +#[derive(Clone, PartialEq, Debug)] pub struct Svh { hash: String, } diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs index a63e8237b4b..16adccfba57 100644 --- a/src/librustc_back/target/mod.rs +++ b/src/librustc_back/target/mod.rs @@ -84,7 +84,7 @@ mod x86_64_unknown_linux_gnu; /// Everything `rustc` knows about how to compile for a specific target. /// /// Every field here must be specified, and has no default value. -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub struct Target { /// [Data layout](http://llvm.org/docs/LangRef.html#data-layout) to pass to LLVM. pub data_layout: String, @@ -107,7 +107,7 @@ pub struct Target { /// /// This has an implementation of `Default`, see each field for what the default is. In general, /// these try to take "minimal defaults" that don't assume anything about the runtime they run in. -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub struct TargetOptions { /// Linker to invoke. Defaults to "cc". pub linker: String, diff --git a/src/librustc_bitflags/lib.rs b/src/librustc_bitflags/lib.rs index e0f5b5c387f..487de3a6bb5 100644 --- a/src/librustc_bitflags/lib.rs +++ b/src/librustc_bitflags/lib.rs @@ -73,7 +73,7 @@ /// } /// } /// -/// impl fmt::Show for Flags { +/// impl fmt::Debug for Flags { /// fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { /// write!(f, "hi!") /// } diff --git a/src/librustc_borrowck/borrowck/gather_loans/restrictions.rs b/src/librustc_borrowck/borrowck/gather_loans/restrictions.rs index c55444c84aa..311229717da 100644 --- a/src/librustc_borrowck/borrowck/gather_loans/restrictions.rs +++ b/src/librustc_borrowck/borrowck/gather_loans/restrictions.rs @@ -21,7 +21,7 @@ use syntax::codemap::Span; use std::rc::Rc; -#[derive(Show)] +#[derive(Debug)] pub enum RestrictionResult<'tcx> { Safe, SafeIf(Rc<LoanPath<'tcx>>, Vec<Rc<LoanPath<'tcx>>>) diff --git a/src/librustc_borrowck/borrowck/mod.rs b/src/librustc_borrowck/borrowck/mod.rs index 449f2a4d006..d90907888e3 100644 --- a/src/librustc_borrowck/borrowck/mod.rs +++ b/src/librustc_borrowck/borrowck/mod.rs @@ -278,7 +278,7 @@ impl<'tcx> Loan<'tcx> { } } -#[derive(Eq, Hash, Show)] +#[derive(Eq, Hash, Debug)] pub struct LoanPath<'tcx> { kind: LoanPathKind<'tcx>, ty: ty::Ty<'tcx>, @@ -293,7 +293,7 @@ impl<'tcx> PartialEq for LoanPath<'tcx> { } } -#[derive(PartialEq, Eq, Hash, Show)] +#[derive(PartialEq, Eq, Hash, Debug)] pub enum LoanPathKind<'tcx> { LpVar(ast::NodeId), // `x` in doc.rs LpUpvar(ty::UpvarId), // `x` captured by-value into closure @@ -314,7 +314,7 @@ impl<'tcx> LoanPath<'tcx> { // b2b39e8700e37ad32b486b9a8409b50a8a53aa51#commitcomment-7892003 static DOWNCAST_PRINTED_OPERATOR : &'static str = " as "; -#[derive(Copy, PartialEq, Eq, Hash, Show)] +#[derive(Copy, PartialEq, Eq, Hash, Debug)] pub enum LoanPathElem { LpDeref(mc::PointerKind), // `*LV` in doc.rs LpInterior(mc::InteriorKind) // `LV.f` in doc.rs @@ -487,7 +487,7 @@ pub enum AliasableViolationKind { BorrowViolation(euv::LoanCause) } -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub enum MovedValueUseKind { MovedInUse, MovedInCapture, diff --git a/src/librustc_borrowck/borrowck/move_data.rs b/src/librustc_borrowck/borrowck/move_data.rs index 9236a6bda59..ece9d61d7f2 100644 --- a/src/librustc_borrowck/borrowck/move_data.rs +++ b/src/librustc_borrowck/borrowck/move_data.rs @@ -76,7 +76,7 @@ pub struct FlowedMoveData<'a, 'tcx: 'a> { } /// Index into `MoveData.paths`, used like a pointer -#[derive(Copy, PartialEq, Eq, PartialOrd, Ord, Show)] +#[derive(Copy, PartialEq, Eq, PartialOrd, Ord, Debug)] pub struct MovePathIndex(uint); impl MovePathIndex { @@ -128,7 +128,7 @@ pub struct MovePath<'tcx> { pub next_sibling: MovePathIndex, } -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub enum MoveKind { Declared, // When declared, variables start out "moved". MoveExpr, // Expression or binding that moves a variable diff --git a/src/librustc_borrowck/graphviz.rs b/src/librustc_borrowck/graphviz.rs index 20ad1307da3..150e616b36c 100644 --- a/src/librustc_borrowck/graphviz.rs +++ b/src/librustc_borrowck/graphviz.rs @@ -26,7 +26,7 @@ use rustc::middle::dataflow; use std::rc::Rc; use std::borrow::IntoCow; -#[derive(Show, Copy)] +#[derive(Debug, Copy)] pub enum Variant { Loans, Moves, diff --git a/src/librustc_driver/pretty.rs b/src/librustc_driver/pretty.rs index b09e9f14357..4ee13f5a542 100644 --- a/src/librustc_driver/pretty.rs +++ b/src/librustc_driver/pretty.rs @@ -42,7 +42,7 @@ use std::old_io::{self, MemReader}; use std::option; use std::str::FromStr; -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub enum PpSourceMode { PpmNormal, PpmEveryBodyLoops, @@ -54,7 +54,7 @@ pub enum PpSourceMode { } -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub enum PpFlowGraphMode { Default, /// Drops the labels from the edges in the flowgraph output. This @@ -63,7 +63,7 @@ pub enum PpFlowGraphMode { /// have become a pain to maintain. UnlabelledEdges, } -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub enum PpMode { PpmSource(PpSourceMode), PpmFlowGraph(PpFlowGraphMode), @@ -338,7 +338,7 @@ fn gather_flowgraph_variants(sess: &Session) -> Vec<borrowck_dot::Variant> { variants } -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub enum UserIdentifiedItem { ItemViaNode(ast::NodeId), ItemViaPath(Vec<String>), diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs index 17191356d3f..5ce916f5360 100644 --- a/src/librustc_llvm/lib.rs +++ b/src/librustc_llvm/lib.rs @@ -115,7 +115,7 @@ pub enum Linkage { } #[repr(C)] -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub enum DiagnosticSeverity { Error, Warning, @@ -312,7 +312,7 @@ pub enum RealPredicate { // The LLVM TypeKind type - must stay in sync with the def of // LLVMTypeKind in llvm/include/llvm-c/Core.h -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] #[repr(C)] pub enum TypeKind { Void = 0, diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 1d9c701a16c..000426771a8 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -127,7 +127,7 @@ enum PatternBindingMode { ArgumentIrrefutableMode, } -#[derive(Copy, PartialEq, Eq, Hash, Show)] +#[derive(Copy, PartialEq, Eq, Hash, Debug)] enum Namespace { TypeNS, ValueNS @@ -193,7 +193,7 @@ impl<'a, 'v, 'tcx> Visitor<'v> for Resolver<'a, 'tcx> { } /// Contains data for specific types of import directives. -#[derive(Copy,Show)] +#[derive(Copy,Debug)] enum ImportDirectiveSubclass { SingleImport(Name /* target */, Name /* source */), GlobImport @@ -242,7 +242,7 @@ enum TypeParameters<'a> { // The rib kind controls the translation of local // definitions (`DefLocal`) to upvars (`DefUpvar`). -#[derive(Copy, Show)] +#[derive(Copy, Debug)] enum RibKind { // No translation needs to be applied. NormalRibKind, @@ -266,7 +266,7 @@ enum RibKind { } // Methods can be required or provided. RequiredMethod methods only occur in traits. -#[derive(Copy, Show)] +#[derive(Copy, Debug)] enum MethodSort { RequiredMethod, ProvidedMethod(NodeId) @@ -301,7 +301,7 @@ enum BareIdentifierPatternResolution { } /// One local scope. -#[derive(Show)] +#[derive(Debug)] struct Rib { bindings: HashMap<Name, DefLike>, kind: RibKind, @@ -317,14 +317,14 @@ impl Rib { } /// Whether an import can be shadowed by another import. -#[derive(Show,PartialEq,Clone,Copy)] +#[derive(Debug,PartialEq,Clone,Copy)] enum Shadowable { Always, Never } /// One import directive. -#[derive(Show)] +#[derive(Debug)] struct ImportDirective { module_path: Vec<Name>, subclass: ImportDirectiveSubclass, @@ -354,7 +354,7 @@ impl ImportDirective { } /// The item that an import resolves to. -#[derive(Clone,Show)] +#[derive(Clone,Debug)] struct Target { target_module: Rc<Module>, bindings: Rc<NameBindings>, @@ -375,7 +375,7 @@ impl Target { } /// An ImportResolution represents a particular `use` directive. -#[derive(Show)] +#[derive(Debug)] struct ImportResolution { /// Whether this resolution came from a `use` or a `pub use`. Note that this /// should *not* be used whenever resolution is being performed, this is @@ -455,7 +455,7 @@ impl ImportResolution { } /// The link from a module up to its nearest parent node. -#[derive(Clone,Show)] +#[derive(Clone,Debug)] enum ParentLink { NoParentLink, ModuleParentLink(Weak<Module>, Name), @@ -463,7 +463,7 @@ enum ParentLink { } /// The type of module this is. -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] enum ModuleKind { NormalModuleKind, TraitModuleKind, @@ -556,7 +556,7 @@ impl fmt::Debug for Module { } bitflags! { - #[derive(Show)] + #[derive(Debug)] flags DefModifiers: u8 { const PUBLIC = 0b0000_0001, const IMPORTABLE = 0b0000_0010, @@ -564,7 +564,7 @@ bitflags! { } // Records a possibly-private type definition. -#[derive(Clone,Show)] +#[derive(Clone,Debug)] struct TypeNsDef { modifiers: DefModifiers, // see note in ImportResolution about how to use this module_def: Option<Rc<Module>>, @@ -573,7 +573,7 @@ struct TypeNsDef { } // Records a possibly-private value definition. -#[derive(Clone, Copy, Show)] +#[derive(Clone, Copy, Debug)] struct ValueNsDef { modifiers: DefModifiers, // see note in ImportResolution about how to use this def: Def, @@ -582,7 +582,7 @@ struct ValueNsDef { // Records the definitions (at most one for each namespace) that a name is // bound to. -#[derive(Show)] +#[derive(Debug)] struct NameBindings { type_def: RefCell<Option<TypeNsDef>>, //< Meaning in type namespace. value_def: RefCell<Option<ValueNsDef>>, //< Meaning in value namespace. diff --git a/src/librustc_trans/save/recorder.rs b/src/librustc_trans/save/recorder.rs index eefaeca8306..ef1eb3cb804 100644 --- a/src/librustc_trans/save/recorder.rs +++ b/src/librustc_trans/save/recorder.rs @@ -63,7 +63,7 @@ macro_rules! svec { }) } -#[derive(Copy,Show)] +#[derive(Copy,Debug)] pub enum Row { Variable, Enum, diff --git a/src/librustc_trans/trans/_match.rs b/src/librustc_trans/trans/_match.rs index 146239d0c48..8d7eb5816c2 100644 --- a/src/librustc_trans/trans/_match.rs +++ b/src/librustc_trans/trans/_match.rs @@ -227,7 +227,7 @@ use syntax::codemap::Span; use syntax::fold::Folder; use syntax::ptr::P; -#[derive(Copy, Show)] +#[derive(Copy, Debug)] struct ConstantExpr<'a>(&'a ast::Expr); impl<'a> ConstantExpr<'a> { @@ -242,7 +242,7 @@ impl<'a> ConstantExpr<'a> { } // An option identifying a branch (either a literal, an enum variant or a range) -#[derive(Show)] +#[derive(Debug)] enum Opt<'a, 'tcx> { ConstantValue(ConstantExpr<'a>), ConstantRange(ConstantExpr<'a>, ConstantExpr<'a>), diff --git a/src/librustc_trans/trans/adt.rs b/src/librustc_trans/trans/adt.rs index 519a7e19125..1deb07e1ba0 100644 --- a/src/librustc_trans/trans/adt.rs +++ b/src/librustc_trans/trans/adt.rs @@ -72,7 +72,7 @@ use util::ppaux::ty_to_string; type Hint = attr::ReprAttr; /// Representations. -#[derive(Eq, PartialEq, Show)] +#[derive(Eq, PartialEq, Debug)] pub enum Repr<'tcx> { /// C-like enums; basically an int. CEnum(IntType, Disr, Disr), // discriminant range (signedness based on the IntType) @@ -117,7 +117,7 @@ pub enum Repr<'tcx> { } /// For structs, and struct-like parts of anything fancier. -#[derive(Eq, PartialEq, Show)] +#[derive(Eq, PartialEq, Debug)] pub struct Struct<'tcx> { // If the struct is DST, then the size and alignment do not take into // account the unsized fields of the struct. @@ -465,7 +465,7 @@ fn mk_struct<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, } } -#[derive(Show)] +#[derive(Debug)] struct IntBounds { slo: i64, shi: i64, diff --git a/src/librustc_trans/trans/cleanup.rs b/src/librustc_trans/trans/cleanup.rs index a25f4f778ab..61a6f4cfe10 100644 --- a/src/librustc_trans/trans/cleanup.rs +++ b/src/librustc_trans/trans/cleanup.rs @@ -50,7 +50,7 @@ pub struct CleanupScope<'blk, 'tcx: 'blk> { cached_landing_pad: Option<BasicBlockRef>, } -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub struct CustomScopeIndex { index: uint } @@ -81,7 +81,7 @@ impl<'blk, 'tcx: 'blk> fmt::Debug for CleanupScopeKind<'blk, 'tcx> { } } -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub enum EarlyExitLabel { UnwindExit, ReturnExit, @@ -106,7 +106,7 @@ pub trait Cleanup<'tcx> { pub type CleanupObj<'tcx> = Box<Cleanup<'tcx>+'tcx>; -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub enum ScopeId { AstScope(ast::NodeId), CustomScope(CustomScopeIndex) @@ -911,7 +911,7 @@ impl<'tcx> Cleanup<'tcx> for DropValue<'tcx> { } } -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub enum Heap { HeapExchange } diff --git a/src/librustc_trans/trans/common.rs b/src/librustc_trans/trans/common.rs index a5c4df7dbb9..7d4e6aed876 100644 --- a/src/librustc_trans/trans/common.rs +++ b/src/librustc_trans/trans/common.rs @@ -1137,7 +1137,7 @@ pub fn drain_fulfillment_cx<'a,'tcx,T>(span: Span, } // Key used to lookup values supplied for type parameters in an expr. -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub enum ExprOrMethodCall { // Type parameters for a path like `None::<int>` ExprId(ast::NodeId), diff --git a/src/librustc_trans/trans/datum.rs b/src/librustc_trans/trans/datum.rs index cba12babb9b..dd4ef97b88d 100644 --- a/src/librustc_trans/trans/datum.rs +++ b/src/librustc_trans/trans/datum.rs @@ -52,7 +52,7 @@ pub struct DatumBlock<'blk, 'tcx: 'blk, K> { pub datum: Datum<'tcx, K>, } -#[derive(Show)] +#[derive(Debug)] pub enum Expr { /// a fresh value that was produced and which has no cleanup yet /// because it has not yet "landed" into its permanent home @@ -64,10 +64,10 @@ pub enum Expr { LvalueExpr, } -#[derive(Clone, Copy, Show)] +#[derive(Clone, Copy, Debug)] pub struct Lvalue; -#[derive(Show)] +#[derive(Debug)] pub struct Rvalue { pub mode: RvalueMode } @@ -83,7 +83,7 @@ impl Drop for Rvalue { fn drop(&mut self) { } } -#[derive(Copy, PartialEq, Eq, Hash, Show)] +#[derive(Copy, PartialEq, Eq, Hash, Debug)] pub enum RvalueMode { /// `val` is a pointer to the actual value (and thus has type *T) ByRef, diff --git a/src/librustc_trans/trans/debuginfo.rs b/src/librustc_trans/trans/debuginfo.rs index 4c1cf62ce8a..ce9af3162a0 100644 --- a/src/librustc_trans/trans/debuginfo.rs +++ b/src/librustc_trans/trans/debuginfo.rs @@ -249,7 +249,7 @@ const FLAGS_NONE: c_uint = 0; // Public Interface of debuginfo module //=----------------------------------------------------------------------------- -#[derive(Copy, Show, Hash, Eq, PartialEq, Clone)] +#[derive(Copy, Debug, Hash, Eq, PartialEq, Clone)] struct UniqueTypeId(ast::Name); // The TypeMap is where the CrateDebugContext holds the type metadata nodes diff --git a/src/librustc_trans/trans/expr.rs b/src/librustc_trans/trans/expr.rs index 02df8826fa1..a6c9a988b4d 100644 --- a/src/librustc_trans/trans/expr.rs +++ b/src/librustc_trans/trans/expr.rs @@ -1924,7 +1924,7 @@ fn float_cast(bcx: Block, } else { llsrc }; } -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub enum cast_kind { cast_pointer, cast_integral, diff --git a/src/librustc_trans/trans/monomorphize.rs b/src/librustc_trans/trans/monomorphize.rs index 72e41408d8a..cc0d76efcf0 100644 --- a/src/librustc_trans/trans/monomorphize.rs +++ b/src/librustc_trans/trans/monomorphize.rs @@ -286,7 +286,7 @@ pub fn monomorphic_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, (lldecl, mono_ty, true) } -#[derive(PartialEq, Eq, Hash, Show)] +#[derive(PartialEq, Eq, Hash, Debug)] pub struct MonoId<'tcx> { pub def: ast::DefId, pub params: subst::VecPerParamSpace<Ty<'tcx>> diff --git a/src/librustc_trans/trans/type_.rs b/src/librustc_trans/trans/type_.rs index 9640443f4f7..e3e4ca62c26 100644 --- a/src/librustc_trans/trans/type_.rs +++ b/src/librustc_trans/trans/type_.rs @@ -27,7 +27,7 @@ use std::iter::repeat; use libc::c_uint; -#[derive(Clone, Copy, PartialEq, Show)] +#[derive(Clone, Copy, PartialEq, Debug)] #[repr(C)] pub struct Type { rf: TypeRef diff --git a/src/librustc_typeck/check/method/probe.rs b/src/librustc_typeck/check/method/probe.rs index 6a3554314e2..4980630a035 100644 --- a/src/librustc_typeck/check/method/probe.rs +++ b/src/librustc_typeck/check/method/probe.rs @@ -73,7 +73,7 @@ pub struct Pick<'tcx> { pub kind: PickKind<'tcx>, } -#[derive(Clone,Show)] +#[derive(Clone,Debug)] pub enum PickKind<'tcx> { InherentImplPick(/* Impl */ ast::DefId), ObjectPick(/* Trait */ ast::DefId, /* method_num */ uint, /* real_index */ uint), @@ -88,7 +88,7 @@ pub type PickResult<'tcx> = Result<Pick<'tcx>, MethodError>; // difference is that it doesn't embed any regions or other // specifics. The "confirmation" step recreates those details as // needed. -#[derive(Clone,Show)] +#[derive(Clone,Debug)] pub enum PickAdjustment { // Indicates that the source expression should be autoderef'd N times // diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 5067a72c881..6dabec31e2c 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -1877,7 +1877,7 @@ impl<'a, 'tcx> RegionScope for FnCtxt<'a, 'tcx> { } } -#[derive(Copy, Show, PartialEq, Eq)] +#[derive(Copy, Debug, PartialEq, Eq)] pub enum LvaluePreference { PreferMutLvalue, NoPreference diff --git a/src/librustc_typeck/variance.rs b/src/librustc_typeck/variance.rs index 63ad47ff31f..dd42c667956 100644 --- a/src/librustc_typeck/variance.rs +++ b/src/librustc_typeck/variance.rs @@ -230,7 +230,7 @@ pub fn infer_variance(tcx: &ty::ctxt) { type VarianceTermPtr<'a> = &'a VarianceTerm<'a>; -#[derive(Copy, Show)] +#[derive(Copy, Debug)] struct InferredIndex(uint); #[derive(Copy)] @@ -266,7 +266,7 @@ struct TermsContext<'a, 'tcx: 'a> { inferred_infos: Vec<InferredInfo<'a>> , } -#[derive(Copy, Show, PartialEq)] +#[derive(Copy, Debug, PartialEq)] enum ParamKind { TypeParam, RegionParam diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index d2080419469..9cb29cb14b8 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -115,7 +115,7 @@ impl<T: Clean<U>, U> Clean<Vec<U>> for syntax::owned_slice::OwnedSlice<T> { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct Crate { pub name: String, pub src: FsPath, @@ -204,7 +204,7 @@ impl<'a, 'tcx> Clean<Crate> for visit_ast::RustdocVisitor<'a, 'tcx> { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct ExternalCrate { pub name: String, pub attrs: Vec<Attribute>, @@ -237,7 +237,7 @@ impl Clean<ExternalCrate> for cstore::crate_metadata { /// Anything with a source location and set of attributes and, optionally, a /// name. That is, anything that can be documented. This doesn't correspond /// directly to the AST's concept of an item; it's a strict superset. -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct Item { /// Stringified span pub source: Span, @@ -313,7 +313,7 @@ impl Item { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub enum ItemEnum { ExternCrateItem(String, Option<String>), ImportItem(Import), @@ -342,7 +342,7 @@ pub enum ItemEnum { AssociatedTypeItem(TyParam), } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct Module { pub items: Vec<Item>, pub is_crate: bool, @@ -401,7 +401,7 @@ impl Clean<Item> for doctree::Module { } } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)] pub enum Attribute { Word(String), List(String, Vec<Attribute> ), @@ -456,7 +456,7 @@ impl<'a> attr::AttrMetaMethods for &'a Attribute { fn span(&self) -> codemap::Span { unimplemented!() } } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)] pub struct TyParam { pub name: String, pub did: ast::DefId, @@ -489,7 +489,7 @@ impl<'tcx> Clean<TyParam> for ty::TypeParameterDef<'tcx> { } } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)] pub enum TyParamBound { RegionBound(Lifetime), TraitBound(PolyTrait, ast::TraitBoundModifier) @@ -684,7 +684,7 @@ impl<'tcx> Clean<Option<Vec<TyParamBound>>> for subst::Substs<'tcx> { } } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)] pub struct Lifetime(String); impl Lifetime { @@ -734,7 +734,7 @@ impl Clean<Option<Lifetime>> for ty::Region { } } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)] pub enum WherePredicate { BoundPredicate { ty: Type, bounds: Vec<TyParamBound> }, RegionPredicate { lifetime: Lifetime, bounds: Vec<Lifetime>}, @@ -843,7 +843,7 @@ impl<'tcx> Clean<Type> for ty::ProjectionTy<'tcx> { } // maybe use a Generic enum and use ~[Generic]? -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)] pub struct Generics { pub lifetimes: Vec<Lifetime>, pub type_params: Vec<TyParam>, @@ -940,7 +940,7 @@ impl<'a, 'tcx> Clean<Generics> for (&'a ty::Generics<'tcx>, subst::ParamSpace) { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct Method { pub generics: Generics, pub self_: SelfTy, @@ -979,7 +979,7 @@ impl Clean<Item> for ast::Method { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct TyMethod { pub unsafety: ast::Unsafety, pub decl: FnDecl, @@ -1017,7 +1017,7 @@ impl Clean<Item> for ast::TypeMethod { } } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)] pub enum SelfTy { SelfStatic, SelfValue, @@ -1038,7 +1038,7 @@ impl Clean<SelfTy> for ast::ExplicitSelf_ { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct Function { pub decl: FnDecl, pub generics: Generics, @@ -1063,14 +1063,14 @@ impl Clean<Item> for doctree::Function { } } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)] pub struct FnDecl { pub inputs: Arguments, pub output: FunctionRetTy, pub attrs: Vec<Attribute>, } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)] pub struct Arguments { pub values: Vec<Argument>, } @@ -1123,7 +1123,7 @@ impl<'a, 'tcx> Clean<FnDecl> for (ast::DefId, &'a ty::PolyFnSig<'tcx>) { } } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)] pub struct Argument { pub type_: Type, pub name: String, @@ -1140,7 +1140,7 @@ impl Clean<Argument> for ast::Arg { } } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)] pub enum FunctionRetTy { Return(Type), DefaultReturn, @@ -1157,7 +1157,7 @@ impl Clean<FunctionRetTy> for ast::FunctionRetTy { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct Trait { pub unsafety: ast::Unsafety, pub items: Vec<TraitMethod>, @@ -1201,7 +1201,7 @@ impl Clean<PolyTrait> for ast::PolyTraitRef { /// An item belonging to a trait, whether a method or associated. Could be named /// TraitItem except that's already taken by an exported enum variant. -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub enum TraitMethod { RequiredMethod(Item), ProvidedMethod(Item), @@ -1246,7 +1246,7 @@ impl Clean<TraitMethod> for ast::TraitItem { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub enum ImplMethod { MethodImplItem(Item), TypeImplItem(Item), @@ -1317,7 +1317,7 @@ impl<'tcx> Clean<Item> for ty::ImplOrTraitItem<'tcx> { } /// A trait reference, which may have higher ranked lifetimes. -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)] pub struct PolyTrait { pub trait_: Type, pub lifetimes: Vec<Lifetime> @@ -1326,7 +1326,7 @@ pub struct PolyTrait { /// A representation of a Type suitable for hyperlinking purposes. Ideally one can get the original /// type out of the AST/ty::ctxt given one of these, if more information is needed. Most importantly /// it does not preserve mutability or boxes. -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)] pub enum Type { /// structs/enums/traits (anything that'd be an ast::TyPath) ResolvedPath { @@ -1370,7 +1370,7 @@ pub enum Type { PolyTraitRef(Vec<TyParamBound>), } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Copy, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Copy, Debug)] pub enum PrimitiveType { Isize, I8, I16, I32, I64, Usize, U8, U16, U32, U64, @@ -1382,7 +1382,7 @@ pub enum PrimitiveType { PrimitiveTuple, } -#[derive(Clone, RustcEncodable, RustcDecodable, Copy, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Copy, Debug)] pub enum TypeKind { TypeEnum, TypeFunction, @@ -1625,7 +1625,7 @@ impl Clean<Type> for ast::QPath { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub enum StructField { HiddenStructField, // inserted later by strip passes TypedStructField(Type), @@ -1684,7 +1684,7 @@ impl Clean<Option<Visibility>> for ast::Visibility { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct Struct { pub struct_type: doctree::StructType, pub generics: Generics, @@ -1714,7 +1714,7 @@ impl Clean<Item> for doctree::Struct { /// This is a more limited form of the standard Struct, different in that /// it lacks the things most items have (name, id, parameterization). Found /// only as a variant in an enum. -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct VariantStruct { pub struct_type: doctree::StructType, pub fields: Vec<Item>, @@ -1731,7 +1731,7 @@ impl Clean<VariantStruct> for syntax::ast::StructDef { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct Enum { pub variants: Vec<Item>, pub generics: Generics, @@ -1756,7 +1756,7 @@ impl Clean<Item> for doctree::Enum { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct Variant { pub kind: VariantKind, } @@ -1824,7 +1824,7 @@ impl<'tcx> Clean<Item> for ty::VariantInfo<'tcx> { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub enum VariantKind { CLikeVariant, TupleVariant(Vec<Type>), @@ -1846,7 +1846,7 @@ impl Clean<VariantKind> for ast::VariantKind { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct Span { pub filename: String, pub loline: uint, @@ -1881,7 +1881,7 @@ impl Clean<Span> for syntax::codemap::Span { } } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)] pub struct Path { pub global: bool, pub segments: Vec<PathSegment>, @@ -1896,7 +1896,7 @@ impl Clean<Path> for ast::Path { } } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)] pub enum PathParameters { AngleBracketed { lifetimes: Vec<Lifetime>, @@ -1930,7 +1930,7 @@ impl Clean<PathParameters> for ast::PathParameters { } } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)] pub struct PathSegment { pub name: String, pub params: PathParameters @@ -1971,7 +1971,7 @@ impl Clean<String> for ast::Name { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct Typedef { pub type_: Type, pub generics: Generics, @@ -1994,7 +1994,7 @@ impl Clean<Item> for doctree::Typedef { } } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)] pub struct BareFunctionDecl { pub unsafety: ast::Unsafety, pub generics: Generics, @@ -2017,7 +2017,7 @@ impl Clean<BareFunctionDecl> for ast::BareFnTy { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct Static { pub type_: Type, pub mutability: Mutability, @@ -2046,7 +2046,7 @@ impl Clean<Item> for doctree::Static { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct Constant { pub type_: Type, pub expr: String, @@ -2069,7 +2069,7 @@ impl Clean<Item> for doctree::Constant { } } -#[derive(Show, Clone, RustcEncodable, RustcDecodable, PartialEq, Copy)] +#[derive(Debug, Clone, RustcEncodable, RustcDecodable, PartialEq, Copy)] pub enum Mutability { Mutable, Immutable, @@ -2084,7 +2084,7 @@ impl Clean<Mutability> for ast::Mutability { } } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Copy, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Copy, Debug)] pub enum ImplPolarity { Positive, Negative, @@ -2099,7 +2099,7 @@ impl Clean<ImplPolarity> for ast::ImplPolarity { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct Impl { pub generics: Generics, pub trait_: Option<Type>, @@ -2219,7 +2219,7 @@ impl Clean<Vec<Item>> for doctree::Import { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub enum Import { // use source as str; SimpleImport(String, ImportSource), @@ -2229,13 +2229,13 @@ pub enum Import { ImportList(ImportSource, Vec<ViewListIdent>), } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct ImportSource { pub path: Path, pub did: Option<ast::DefId>, } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct ViewListIdent { pub name: String, pub source: Option<ast::DefId>, @@ -2454,7 +2454,7 @@ fn resolve_def(cx: &DocContext, id: ast::NodeId) -> Option<ast::DefId> { }) } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct Macro { pub source: String, } @@ -2475,7 +2475,7 @@ impl Clean<Item> for doctree::Macro { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct Stability { pub level: attr::StabilityLevel, pub feature: String, @@ -2595,7 +2595,7 @@ fn lang_struct(cx: &DocContext, did: Option<ast::DefId>, } /// An equality constraint on an associated type, e.g. `A=Bar` in `Foo<A=Bar>` -#[derive(Clone, PartialEq, RustcDecodable, RustcEncodable, Show)] +#[derive(Clone, PartialEq, RustcDecodable, RustcEncodable, Debug)] pub struct TypeBinding { pub name: String, pub ty: Type diff --git a/src/librustdoc/doctree.rs b/src/librustdoc/doctree.rs index 0e8ab594c20..ba5df56f4fb 100644 --- a/src/librustdoc/doctree.rs +++ b/src/librustdoc/doctree.rs @@ -72,7 +72,7 @@ impl Module { } } -#[derive(Show, Clone, RustcEncodable, RustcDecodable, Copy)] +#[derive(Debug, Clone, RustcEncodable, RustcDecodable, Copy)] pub enum StructType { /// A normal struct Plain, @@ -145,7 +145,7 @@ pub struct Typedef { pub stab: Option<attr::Stability>, } -#[derive(Show)] +#[derive(Debug)] pub struct Static { pub type_: P<ast::Ty>, pub mutability: ast::Mutability, diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index 00182a80ab3..1c916ad817c 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -395,7 +395,7 @@ pub fn find_testable_code(doc: &str, tests: &mut ::test::Collector) { } } -#[derive(Eq, PartialEq, Clone, Show)] +#[derive(Eq, PartialEq, Clone, Debug)] struct LangString { should_fail: bool, no_run: bool, diff --git a/src/libserialize/hex.rs b/src/libserialize/hex.rs index 91c2561753b..d3c2ffa9544 100644 --- a/src/libserialize/hex.rs +++ b/src/libserialize/hex.rs @@ -61,7 +61,7 @@ pub trait FromHex { } /// Errors that can occur when decoding a hex encoded string -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub enum FromHexError { /// The input contained a character not part of the hex format InvalidHexCharacter(char, uint), diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs index c21d4c60f7b..c13f9213b1e 100644 --- a/src/libserialize/json.rs +++ b/src/libserialize/json.rs @@ -214,7 +214,7 @@ use unicode::str::Utf16Item; use Encodable; /// Represents a json value -#[derive(Clone, PartialEq, PartialOrd, Show)] +#[derive(Clone, PartialEq, PartialOrd, Debug)] pub enum Json { I64(i64), U64(u64), @@ -235,7 +235,7 @@ pub struct AsJson<'a, T: 'a> { inner: &'a T } pub struct AsPrettyJson<'a, T: 'a> { inner: &'a T, indent: Option<uint> } /// The errors that can arise while parsing a JSON stream. -#[derive(Clone, Copy, PartialEq, Show)] +#[derive(Clone, Copy, PartialEq, Debug)] pub enum ErrorCode { InvalidSyntax, InvalidNumber, @@ -256,7 +256,7 @@ pub enum ErrorCode { NotUtf8, } -#[derive(Clone, Copy, PartialEq, Show)] +#[derive(Clone, Copy, PartialEq, Debug)] pub enum ParserError { /// msg, line, col SyntaxError(ErrorCode, uint, uint), @@ -266,7 +266,7 @@ pub enum ParserError { // Builder and Parser have the same errors. pub type BuilderError = ParserError; -#[derive(Clone, PartialEq, Show)] +#[derive(Clone, PartialEq, Debug)] pub enum DecoderError { ParseError(ParserError), ExpectedError(string::String, string::String), @@ -275,7 +275,7 @@ pub enum DecoderError { ApplicationError(string::String) } -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub enum EncoderError { FmtError(fmt::Error), BadHashmapKey, @@ -1239,7 +1239,7 @@ impl Index<uint> for Json { } /// The output of the streaming parser. -#[derive(PartialEq, Clone, Show)] +#[derive(PartialEq, Clone, Debug)] pub enum JsonEvent { ObjectStart, ObjectEnd, @@ -1254,7 +1254,7 @@ pub enum JsonEvent { Error(ParserError), } -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] enum ParserState { // Parse a value in an array, true means first element. ParseArray(bool), @@ -1284,7 +1284,7 @@ pub struct Stack { /// For example, StackElement::Key("foo"), StackElement::Key("bar"), /// StackElement::Index(3) and StackElement::Key("x") are the /// StackElements compositing the stack that represents foo.bar[3].x -#[derive(PartialEq, Clone, Show)] +#[derive(PartialEq, Clone, Debug)] pub enum StackElement<'l> { Index(u32), Key(&'l str), @@ -1292,7 +1292,7 @@ pub enum StackElement<'l> { // Internally, Key elements are stored as indices in a buffer to avoid // allocating a string for every member of an object. -#[derive(PartialEq, Clone, Show)] +#[derive(PartialEq, Clone, Debug)] enum InternalStackElement { InternalIndex(u32), InternalKey(u16, u16), // start, size @@ -2623,7 +2623,7 @@ mod tests { use std::num::Float; use std::string; - #[derive(RustcDecodable, Eq, PartialEq, Show)] + #[derive(RustcDecodable, Eq, PartialEq, Debug)] struct OptionData { opt: Option<uint>, } @@ -2650,20 +2650,20 @@ mod tests { ExpectedError("Number".to_string(), "false".to_string())); } - #[derive(PartialEq, RustcEncodable, RustcDecodable, Show)] + #[derive(PartialEq, RustcEncodable, RustcDecodable, Debug)] enum Animal { Dog, Frog(string::String, int) } - #[derive(PartialEq, RustcEncodable, RustcDecodable, Show)] + #[derive(PartialEq, RustcEncodable, RustcDecodable, Debug)] struct Inner { a: (), b: uint, c: Vec<string::String>, } - #[derive(PartialEq, RustcEncodable, RustcDecodable, Show)] + #[derive(PartialEq, RustcEncodable, RustcDecodable, Debug)] struct Outer { inner: Vec<Inner>, } diff --git a/src/libstd/num/mod.rs b/src/libstd/num/mod.rs index cb74c741b2f..d010a5de622 100644 --- a/src/libstd/num/mod.rs +++ b/src/libstd/num/mod.rs @@ -951,7 +951,7 @@ mod tests { test_checked_next_power_of_two! { test_checked_next_power_of_two_u64, u64 } test_checked_next_power_of_two! { test_checked_next_power_of_two_uint, uint } - #[derive(PartialEq, Show)] + #[derive(PartialEq, Debug)] struct Value { x: int } impl ToPrimitive for Value { diff --git a/src/libstd/old_io/mod.rs b/src/libstd/old_io/mod.rs index 6c5ce129a33..c9cabe648b9 100644 --- a/src/libstd/old_io/mod.rs +++ b/src/libstd/old_io/mod.rs @@ -320,7 +320,7 @@ pub type IoResult<T> = Result<T, IoError>; /// # FIXME /// /// Is something like this sufficient? It's kind of archaic -#[derive(PartialEq, Eq, Clone, Show)] +#[derive(PartialEq, Eq, Clone, Debug)] pub struct IoError { /// An enumeration which can be matched against for determining the flavor /// of error. @@ -376,7 +376,7 @@ impl Error for IoError { } /// A list specifying general categories of I/O error. -#[derive(Copy, PartialEq, Eq, Clone, Show)] +#[derive(Copy, PartialEq, Eq, Clone, Debug)] pub enum IoErrorKind { /// Any I/O error not part of this list. OtherIoError, @@ -1662,7 +1662,7 @@ pub fn standard_error(kind: IoErrorKind) -> IoError { /// A mode specifies how a file should be opened or created. These modes are /// passed to `File::open_mode` and are used to control where the file is /// positioned when it is initially opened. -#[derive(Copy, Clone, PartialEq, Eq, Show)] +#[derive(Copy, Clone, PartialEq, Eq, Debug)] pub enum FileMode { /// Opens a file positioned at the beginning. Open, @@ -1674,7 +1674,7 @@ pub enum FileMode { /// Access permissions with which the file should be opened. `File`s /// opened with `Read` will return an error if written to. -#[derive(Copy, Clone, PartialEq, Eq, Show)] +#[derive(Copy, Clone, PartialEq, Eq, Debug)] pub enum FileAccess { /// Read-only access, requests to write will result in an error Read, @@ -1685,7 +1685,7 @@ pub enum FileAccess { } /// Different kinds of files which can be identified by a call to stat -#[derive(Copy, PartialEq, Show, Hash, Clone)] +#[derive(Copy, PartialEq, Debug, Hash, Clone)] pub enum FileType { /// This is a normal file, corresponding to `S_IFREG` RegularFile, @@ -1789,7 +1789,7 @@ pub struct UnstableFileStat { bitflags! { /// A set of permissions for a file or directory is represented by a set of /// flags which are or'd together. - #[derive(Show)] + #[derive(Debug)] flags FilePermission: u32 { const USER_READ = 0o400, const USER_WRITE = 0o200, @@ -1845,7 +1845,7 @@ mod tests { use prelude::v1::{Ok, Vec, Buffer, SliceExt}; use uint; - #[derive(Clone, PartialEq, Show)] + #[derive(Clone, PartialEq, Debug)] enum BadReaderBehavior { GoodBehavior(uint), BadBehavior(uint) diff --git a/src/libstd/old_io/net/addrinfo.rs b/src/libstd/old_io/net/addrinfo.rs index 9800cc6829e..e37744f3aa3 100644 --- a/src/libstd/old_io/net/addrinfo.rs +++ b/src/libstd/old_io/net/addrinfo.rs @@ -29,7 +29,7 @@ use sys; use vec::Vec; /// Hints to the types of sockets that are desired when looking up hosts -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub enum SocketType { Stream, Datagram, Raw } @@ -38,7 +38,7 @@ pub enum SocketType { /// to manipulate how a query is performed. /// /// The meaning of each of these flags can be found with `man -s 3 getaddrinfo` -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub enum Flag { AddrConfig, All, @@ -51,7 +51,7 @@ pub enum Flag { /// A transport protocol associated with either a hint or a return value of /// `lookup` -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub enum Protocol { TCP, UDP } @@ -61,7 +61,7 @@ pub enum Protocol { /// /// For details on these fields, see their corresponding definitions via /// `man -s 3 getaddrinfo` -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub struct Hint { pub family: uint, pub socktype: Option<SocketType>, @@ -69,7 +69,7 @@ pub struct Hint { pub flags: uint, } -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub struct Info { pub address: SocketAddr, pub family: uint, diff --git a/src/libstd/old_io/net/ip.rs b/src/libstd/old_io/net/ip.rs index e60b455aecd..f0b73bd37f2 100644 --- a/src/libstd/old_io/net/ip.rs +++ b/src/libstd/old_io/net/ip.rs @@ -32,7 +32,7 @@ use vec::Vec; pub type Port = u16; -#[derive(Copy, PartialEq, Eq, Clone, Hash, Show)] +#[derive(Copy, PartialEq, Eq, Clone, Hash, Debug)] pub enum IpAddr { Ipv4Addr(u8, u8, u8, u8), Ipv6Addr(u16, u16, u16, u16, u16, u16, u16, u16) @@ -64,7 +64,7 @@ impl fmt::Display for IpAddr { } } -#[derive(Copy, PartialEq, Eq, Clone, Hash, Show)] +#[derive(Copy, PartialEq, Eq, Clone, Hash, Debug)] pub struct SocketAddr { pub ip: IpAddr, pub port: Port, diff --git a/src/libstd/old_io/process.rs b/src/libstd/old_io/process.rs index e6037d12c28..d3e60de2780 100644 --- a/src/libstd/old_io/process.rs +++ b/src/libstd/old_io/process.rs @@ -96,12 +96,12 @@ pub struct Process { /// A representation of environment variable name /// It compares case-insensitive on Windows and case-sensitive everywhere else. #[cfg(not(windows))] -#[derive(Hash, PartialEq, Eq, Clone, Show)] +#[derive(Hash, PartialEq, Eq, Clone, Debug)] struct EnvKey(CString); #[doc(hidden)] #[cfg(windows)] -#[derive(Eq, Clone, Show)] +#[derive(Eq, Clone, Debug)] struct EnvKey(CString); #[cfg(windows)] @@ -492,7 +492,7 @@ pub enum StdioContainer { /// Describes the result of a process after it has terminated. /// Note that Windows have no signals, so the result is usually ExitStatus. -#[derive(PartialEq, Eq, Clone, Copy, Show)] +#[derive(PartialEq, Eq, Clone, Copy, Debug)] pub enum ProcessExit { /// Normal termination with an exit status. ExitStatus(int), diff --git a/src/libstd/old_io/util.rs b/src/libstd/old_io/util.rs index 87b3b9fe415..9a55f32c372 100644 --- a/src/libstd/old_io/util.rs +++ b/src/libstd/old_io/util.rs @@ -16,7 +16,7 @@ use old_io; use slice::bytes::MutableByteVector; /// Wraps a `Reader`, limiting the number of bytes that can be read from it. -#[derive(Show)] +#[derive(Debug)] pub struct LimitReader<R> { limit: uint, inner: R @@ -78,7 +78,7 @@ impl<R: Buffer> Buffer for LimitReader<R> { } /// A `Writer` which ignores bytes written to it, like /dev/null. -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub struct NullWriter; impl Writer for NullWriter { @@ -87,7 +87,7 @@ impl Writer for NullWriter { } /// A `Reader` which returns an infinite stream of 0 bytes, like /dev/zero. -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub struct ZeroReader; impl Reader for ZeroReader { @@ -108,7 +108,7 @@ impl Buffer for ZeroReader { } /// A `Reader` which is always at EOF, like /dev/null. -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub struct NullReader; impl Reader for NullReader { @@ -129,7 +129,7 @@ impl Buffer for NullReader { /// /// The `Writer`s are delegated to in order. If any `Writer` returns an error, /// that error is returned immediately and remaining `Writer`s are not called. -#[derive(Show)] +#[derive(Debug)] pub struct MultiWriter<W> { writers: Vec<W> } @@ -161,7 +161,7 @@ impl<W> Writer for MultiWriter<W> where W: Writer { /// A `Reader` which chains input from multiple `Reader`s, reading each to /// completion before moving onto the next. -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub struct ChainedReader<I, R> { readers: I, cur_reader: Option<R>, @@ -200,7 +200,7 @@ impl<R: Reader, I: Iterator<Item=R>> Reader for ChainedReader<I, R> { /// A `Reader` which forwards input from another `Reader`, passing it along to /// a `Writer` as well. Similar to the `tee(1)` command. -#[derive(Show)] +#[derive(Debug)] pub struct TeeReader<R, W> { reader: R, writer: W, @@ -242,7 +242,7 @@ pub fn copy<R: Reader, W: Writer>(r: &mut R, w: &mut W) -> old_io::IoResult<()> } /// An adaptor converting an `Iterator<u8>` to a `Reader`. -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub struct IterReader<T> { iter: T, } diff --git a/src/libstd/os.rs b/src/libstd/os.rs index fc5ac861b30..38c0a7b8f9b 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -857,7 +857,7 @@ pub enum MapOption { } /// Possible errors when creating a map. -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub enum MapError { /// # The following are POSIX-specific /// diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index 34faa65af75..2e6b9d50553 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -959,7 +959,7 @@ pub fn is_sep_byte_verbatim(u: &u8) -> bool { } /// Prefix types for Path -#[derive(Copy, PartialEq, Clone, Show)] +#[derive(Copy, PartialEq, Clone, Debug)] pub enum PathPrefix { /// Prefix `\\?\`, uint is the length of the following component VerbatimPrefix(uint), diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs index 43e1b1a2264..6a43eccbaba 100644 --- a/src/libstd/sync/mpsc/mod.rs +++ b/src/libstd/sync/mpsc/mod.rs @@ -390,13 +390,13 @@ pub struct SendError<T>(pub T); /// /// The `recv` operation can only fail if the sending half of a channel is /// disconnected, implying that no further messages will ever be received. -#[derive(PartialEq, Eq, Clone, Copy, Show)] +#[derive(PartialEq, Eq, Clone, Copy, Debug)] #[stable(feature = "rust1", since = "1.0.0")] pub struct RecvError; /// This enumeration is the list of the possible reasons that try_recv could not /// return data when called. -#[derive(PartialEq, Clone, Copy, Show)] +#[derive(PartialEq, Clone, Copy, Debug)] #[stable(feature = "rust1", since = "1.0.0")] pub enum TryRecvError { /// This channel is currently empty, but the sender(s) have not yet diff --git a/src/libstd/sync/mpsc/sync.rs b/src/libstd/sync/mpsc/sync.rs index 574892d419a..da3ce51a652 100644 --- a/src/libstd/sync/mpsc/sync.rs +++ b/src/libstd/sync/mpsc/sync.rs @@ -105,7 +105,7 @@ struct Buffer<T> { size: uint, } -#[derive(Show)] +#[derive(Debug)] pub enum Failure { Empty, Disconnected, diff --git a/src/libstd/sys/common/net.rs b/src/libstd/sys/common/net.rs index e42db42dc60..51b6e0a1c1e 100644 --- a/src/libstd/sys/common/net.rs +++ b/src/libstd/sys/common/net.rs @@ -32,7 +32,7 @@ use old_io; // FIXME: move uses of Arc and deadline tracking to std::io -#[derive(Show)] +#[derive(Debug)] pub enum SocketStatus { Readable, Writable, diff --git a/src/libstd/time/duration.rs b/src/libstd/time/duration.rs index fdd9cbdccf5..483e5995298 100644 --- a/src/libstd/time/duration.rs +++ b/src/libstd/time/duration.rs @@ -45,7 +45,7 @@ macro_rules! try_opt { /// ISO 8601 time duration with nanosecond precision. /// This also allows for the negative duration; see individual methods for details. -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Show)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug)] pub struct Duration { secs: i64, nanos: i32, // Always 0 <= nanos < NANOS_PER_SEC diff --git a/src/libsyntax/abi.rs b/src/libsyntax/abi.rs index 5f593ac7081..2325b3778c7 100644 --- a/src/libsyntax/abi.rs +++ b/src/libsyntax/abi.rs @@ -15,7 +15,7 @@ pub use self::AbiArchitecture::*; use std::fmt; -#[derive(Copy, PartialEq, Eq, Show)] +#[derive(Copy, PartialEq, Eq, Debug)] pub enum Os { OsWindows, OsMacos, @@ -26,7 +26,7 @@ pub enum Os { OsDragonfly, } -#[derive(PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Clone, Copy, Show)] +#[derive(PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Clone, Copy, Debug)] pub enum Abi { // NB: This ordering MUST match the AbiDatas array below. // (This is ensured by the test indices_are_correct().) @@ -47,7 +47,7 @@ pub enum Abi { } #[allow(non_camel_case_types)] -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub enum Architecture { X86, X86_64, diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 4dada5bc81e..11068880b0e 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -208,14 +208,14 @@ impl Decodable for Ident { pub type FnIdent = Option<Ident>; #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, - Show, Copy)] + Debug, Copy)] pub struct Lifetime { pub id: NodeId, pub span: Span, pub name: Name } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct LifetimeDef { pub lifetime: Lifetime, pub bounds: Vec<Lifetime> @@ -224,7 +224,7 @@ pub struct LifetimeDef { /// A "Path" is essentially Rust's notion of a name; for instance: /// std::cmp::PartialEq . It's represented as a sequence of identifiers, /// along with a bunch of supporting information. -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Path { pub span: Span, /// A `::foo` path, is relative to the crate root rather than current @@ -236,7 +236,7 @@ pub struct Path { /// A segment of a path: an identifier, an optional lifetime, and a set of /// types. -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct PathSegment { /// The identifier portion of this path segment. pub identifier: Ident, @@ -249,7 +249,7 @@ pub struct PathSegment { pub parameters: PathParameters, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum PathParameters { AngleBracketedParameters(AngleBracketedParameterData), ParenthesizedParameters(ParenthesizedParameterData), @@ -327,7 +327,7 @@ impl PathParameters { } /// A path like `Foo<'a, T>` -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct AngleBracketedParameterData { /// The lifetime parameters for this path segment. pub lifetimes: Vec<Lifetime>, @@ -345,7 +345,7 @@ impl AngleBracketedParameterData { } /// A path like `Foo(A,B) -> C` -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct ParenthesizedParameterData { /// Overall span pub span: Span, @@ -362,7 +362,7 @@ pub type CrateNum = u32; pub type NodeId = u32; #[derive(Clone, Eq, Ord, PartialOrd, PartialEq, RustcEncodable, - RustcDecodable, Hash, Show, Copy)] + RustcDecodable, Hash, Debug, Copy)] pub struct DefId { pub krate: CrateNum, pub node: NodeId, @@ -382,7 +382,7 @@ pub const DUMMY_NODE_ID: NodeId = -1; /// typeck::collect::compute_bounds matches these against /// the "special" built-in traits (see middle::lang_items) and /// detects Copy, Send and Sync. -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum TyParamBound { TraitTyParamBound(PolyTraitRef, TraitBoundModifier), RegionTyParamBound(Lifetime) @@ -390,7 +390,7 @@ pub enum TyParamBound { /// A modifier on a bound, currently this is only used for `?Sized`, where the /// modifier is `Maybe`. Negative bounds should also be handled here. -#[derive(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum TraitBoundModifier { None, Maybe, @@ -398,7 +398,7 @@ pub enum TraitBoundModifier { pub type TyParamBounds = OwnedSlice<TyParamBound>; -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct TyParam { pub ident: Ident, pub id: NodeId, @@ -409,7 +409,7 @@ pub struct TyParam { /// Represents lifetimes and type parameters attached to a declaration /// of a function, enum, trait, etc. -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Generics { pub lifetimes: Vec<LifetimeDef>, pub ty_params: OwnedSlice<TyParam>, @@ -428,34 +428,34 @@ impl Generics { } } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct WhereClause { pub id: NodeId, pub predicates: Vec<WherePredicate>, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum WherePredicate { BoundPredicate(WhereBoundPredicate), RegionPredicate(WhereRegionPredicate), EqPredicate(WhereEqPredicate) } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct WhereBoundPredicate { pub span: Span, pub bounded_ty: P<Ty>, pub bounds: OwnedSlice<TyParamBound>, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct WhereRegionPredicate { pub span: Span, pub lifetime: Lifetime, pub bounds: Vec<Lifetime>, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct WhereEqPredicate { pub id: NodeId, pub span: Span, @@ -467,7 +467,7 @@ pub struct WhereEqPredicate { /// used to drive conditional compilation pub type CrateConfig = Vec<P<MetaItem>> ; -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Crate { pub module: Mod, pub attrs: Vec<Attribute>, @@ -478,7 +478,7 @@ pub struct Crate { pub type MetaItem = Spanned<MetaItem_>; -#[derive(Clone, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum MetaItem_ { MetaWord(InternedString), MetaList(InternedString, Vec<P<MetaItem>>), @@ -510,7 +510,7 @@ impl PartialEq for MetaItem_ { } } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Block { pub stmts: Vec<P<Stmt>>, pub expr: Option<P<Expr>>, @@ -519,27 +519,27 @@ pub struct Block { pub span: Span, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Pat { pub id: NodeId, pub node: Pat_, pub span: Span, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct FieldPat { pub ident: Ident, pub pat: P<Pat>, pub is_shorthand: bool, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum BindingMode { BindByRef(Mutability), BindByValue(Mutability), } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum PatWildKind { /// Represents the wildcard pattern `_` PatWildSingle, @@ -548,7 +548,7 @@ pub enum PatWildKind { PatWildMulti, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum Pat_ { /// Represents a wildcard pattern (either `_` or `..`) PatWild(PatWildKind), @@ -577,13 +577,13 @@ pub enum Pat_ { PatMac(Mac), } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum Mutability { MutMutable, MutImmutable, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum BinOp_ { BiAdd, BiSub, @@ -607,7 +607,7 @@ pub enum BinOp_ { pub type BinOp = Spanned<BinOp_>; -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum UnOp { UnUniq, UnDeref, @@ -617,7 +617,7 @@ pub enum UnOp { pub type Stmt = Spanned<Stmt_>; -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum Stmt_ { /// Could be an item or a local (let) binding: StmtDecl(P<Decl>, NodeId), @@ -631,7 +631,7 @@ pub enum Stmt_ { StmtMac(P<Mac>, MacStmtStyle), } -#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum MacStmtStyle { /// The macro statement had a trailing semicolon, e.g. `foo! { ... };` /// `foo!(...);`, `foo![...];` @@ -646,7 +646,7 @@ pub enum MacStmtStyle { /// Where a local declaration came from: either a true `let ... = /// ...;`, or one desugared from the pattern of a for loop. -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum LocalSource { LocalLet, LocalFor, @@ -655,7 +655,7 @@ pub enum LocalSource { // FIXME (pending discussion of #1697, #2178...): local should really be // a refinement on pat. /// Local represents a `let` statement, e.g., `let <pat>:<ty> = <expr>;` -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Local { pub pat: P<Pat>, pub ty: Option<P<Ty>>, @@ -667,7 +667,7 @@ pub struct Local { pub type Decl = Spanned<Decl_>; -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum Decl_ { /// A local (let) binding: DeclLocal(P<Local>), @@ -676,7 +676,7 @@ pub enum Decl_ { } /// represents one arm of a 'match' -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Arm { pub attrs: Vec<Attribute>, pub pats: Vec<P<Pat>>, @@ -684,7 +684,7 @@ pub struct Arm { pub body: P<Expr>, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Field { pub ident: SpannedIdent, pub expr: P<Expr>, @@ -693,26 +693,26 @@ pub struct Field { pub type SpannedIdent = Spanned<Ident>; -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum BlockCheckMode { DefaultBlock, UnsafeBlock(UnsafeSource), } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum UnsafeSource { CompilerGenerated, UserProvided, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Expr { pub id: NodeId, pub node: Expr_, pub span: Span, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum Expr_ { /// First expr is the place; second expr is the value. ExprBox(Option<P<Expr>>, P<Expr>), @@ -776,28 +776,28 @@ pub enum Expr_ { /// <Vec<T> as SomeTrait>::SomeAssociatedItem /// ^~~~~ ^~~~~~~~~ ^~~~~~~~~~~~~~~~~~ /// self_type trait_name item_path -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct QPath { pub self_type: P<Ty>, pub trait_ref: P<TraitRef>, pub item_path: PathSegment, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum MatchSource { Normal, IfLetDesugar { contains_else_clause: bool }, WhileLetDesugar, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum CaptureClause { CaptureByValue, CaptureByRef, } /// A delimited sequence of token trees -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Delimited { /// The type of delimiter pub delim: token::DelimToken, @@ -832,7 +832,7 @@ impl Delimited { } /// A sequence of token treesee -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct SequenceRepetition { /// The sequence of token trees pub tts: Vec<TokenTree>, @@ -846,7 +846,7 @@ pub struct SequenceRepetition { /// A Kleene-style [repetition operator](http://en.wikipedia.org/wiki/Kleene_star) /// for token sequences. -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum KleeneOp { ZeroOrMore, OneOrMore, @@ -864,7 +864,7 @@ pub enum KleeneOp { /// /// The RHS of an MBE macro is the only place `SubstNt`s are substituted. /// Nothing special happens to misnamed or misplaced `SubstNt`s. -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] #[doc="For macro invocations; parsing is delegated to the macro"] pub enum TokenTree { /// A single token @@ -955,14 +955,14 @@ pub type Mac = Spanned<Mac_>; /// is being invoked, and the vector of token-trees contains the source /// of the macro invocation. /// There's only one flavor, now, so this could presumably be simplified. -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum Mac_ { // NB: the additional ident for a macro_rules-style macro is actually // stored in the enclosing item. Oog. MacInvocTT(Path, Vec<TokenTree>, SyntaxContext), // new macro-invocation } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum StrStyle { CookedStr, RawStr(usize) @@ -970,7 +970,7 @@ pub enum StrStyle { pub type Lit = Spanned<Lit_>; -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum Sign { Minus, Plus @@ -986,7 +986,7 @@ impl Sign { } } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum LitIntType { SignedIntLit(IntTy, Sign), UnsignedIntLit(UintTy), @@ -1003,7 +1003,7 @@ impl LitIntType { } } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum Lit_ { LitStr(InternedString, StrStyle), LitBinary(Rc<Vec<u8>>), @@ -1017,13 +1017,13 @@ pub enum Lit_ { // NB: If you change this, you'll probably want to change the corresponding // type structure in middle/ty.rs as well. -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct MutTy { pub ty: P<Ty>, pub mutbl: Mutability, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct TypeField { pub ident: Ident, pub mt: MutTy, @@ -1032,7 +1032,7 @@ pub struct TypeField { /// Represents a required method in a trait declaration, /// one without a default implementation -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct TypeMethod { pub ident: Ident, pub attrs: Vec<Attribute>, @@ -1050,26 +1050,26 @@ pub struct TypeMethod { /// a default implementation A trait method is either required (meaning it /// doesn't have an implementation, just a signature) or provided (meaning it /// has a default implementation). -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum TraitItem { RequiredMethod(TypeMethod), ProvidedMethod(P<Method>), TypeTraitItem(P<AssociatedType>), } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum ImplItem { MethodImplItem(P<Method>), TypeImplItem(P<Typedef>), } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct AssociatedType { pub attrs: Vec<Attribute>, pub ty_param: TyParam, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Typedef { pub id: NodeId, pub span: Span, @@ -1196,7 +1196,7 @@ impl FloatTy { } // Bind a type to an associated type: `A=Foo`. -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct TypeBinding { pub id: NodeId, pub ident: Ident, @@ -1206,7 +1206,7 @@ pub struct TypeBinding { // NB PartialEq method appears below. -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Ty { pub id: NodeId, pub node: Ty_, @@ -1214,7 +1214,7 @@ pub struct Ty { } /// Not represented directly in the AST, referred to by name through a ty_path. -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum PrimTy { TyInt(IntTy), TyUint(UintTy), @@ -1224,7 +1224,7 @@ pub enum PrimTy { TyChar } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct BareFnTy { pub unsafety: Unsafety, pub abi: Abi, @@ -1232,7 +1232,7 @@ pub struct BareFnTy { pub decl: P<FnDecl> } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] /// The different kinds of types recognized by the compiler pub enum Ty_ { TyVec(P<Ty>), @@ -1265,13 +1265,13 @@ pub enum Ty_ { TyInfer, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum AsmDialect { AsmAtt, AsmIntel } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct InlineAsm { pub asm: InternedString, pub asm_str_style: StrStyle, @@ -1285,7 +1285,7 @@ pub struct InlineAsm { } /// represents an argument in a function header -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Arg { pub ty: P<Ty>, pub pat: P<Pat>, @@ -1313,14 +1313,14 @@ impl Arg { } /// represents the header (not the body) of a function declaration -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct FnDecl { pub inputs: Vec<Arg>, pub output: FunctionRetTy, pub variadic: bool } -#[derive(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum Unsafety { Unsafe, Normal, @@ -1353,7 +1353,7 @@ impl fmt::Debug for ImplPolarity { } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum FunctionRetTy { /// Functions with return type ! that always /// raise an error or exit (i.e. never return to the caller) @@ -1377,7 +1377,7 @@ impl FunctionRetTy { } /// Represents the kind of 'self' associated with a method -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum ExplicitSelf_ { /// No self SelfStatic, @@ -1391,7 +1391,7 @@ pub enum ExplicitSelf_ { pub type ExplicitSelf = Spanned<ExplicitSelf_>; -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Method { pub attrs: Vec<Attribute>, pub id: NodeId, @@ -1399,7 +1399,7 @@ pub struct Method { pub node: Method_, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum Method_ { /// Represents a method declaration MethDecl(Ident, @@ -1414,7 +1414,7 @@ pub enum Method_ { MethMac(Mac), } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Mod { /// A span from the first token past `{` to the last token until `}`. /// For `mod foo;`, the inner span ranges from the first token @@ -1423,30 +1423,30 @@ pub struct Mod { pub items: Vec<P<Item>>, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct ForeignMod { pub abi: Abi, pub items: Vec<P<ForeignItem>>, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct VariantArg { pub ty: P<Ty>, pub id: NodeId, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum VariantKind { TupleVariantKind(Vec<VariantArg>), StructVariantKind(P<StructDef>), } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct EnumDef { pub variants: Vec<P<Variant>>, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Variant_ { pub name: Ident, pub attrs: Vec<Attribute>, @@ -1458,7 +1458,7 @@ pub struct Variant_ { pub type Variant = Spanned<Variant_>; -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum PathListItem_ { PathListIdent { name: Ident, id: NodeId }, PathListMod { id: NodeId } @@ -1476,7 +1476,7 @@ pub type PathListItem = Spanned<PathListItem_>; pub type ViewPath = Spanned<ViewPath_>; -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum ViewPath_ { /// `foo::bar::baz as quux` @@ -1499,17 +1499,17 @@ pub type Attribute = Spanned<Attribute_>; /// Distinguishes between Attributes that decorate items and Attributes that /// are contained as statements within items. These two cases need to be /// distinguished for pretty-printing. -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum AttrStyle { AttrOuter, AttrInner, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub struct AttrId(pub usize); /// Doc-comments are promoted to attributes that have is_sugared_doc = true -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Attribute_ { pub id: AttrId, pub style: AttrStyle, @@ -1522,13 +1522,13 @@ pub struct Attribute_ { /// that the ref_id is for. The impl_id maps to the "self type" of this impl. /// If this impl is an ItemImpl, the impl_id is redundant (it could be the /// same as the impl's node id). -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct TraitRef { pub path: Path, pub ref_id: NodeId, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct PolyTraitRef { /// The `'a` in `<'a> Foo<&'a T>` pub bound_lifetimes: Vec<LifetimeDef>, @@ -1537,7 +1537,7 @@ pub struct PolyTraitRef { pub trait_ref: TraitRef, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum Visibility { Public, Inherited, @@ -1552,7 +1552,7 @@ impl Visibility { } } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct StructField_ { pub kind: StructFieldKind, pub id: NodeId, @@ -1571,7 +1571,7 @@ impl StructField_ { pub type StructField = Spanned<StructField_>; -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum StructFieldKind { NamedField(Ident, Visibility), /// Element of a tuple-like struct @@ -1587,7 +1587,7 @@ impl StructFieldKind { } } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct StructDef { /// Fields, not including ctor pub fields: Vec<StructField>, @@ -1600,7 +1600,7 @@ pub struct StructDef { FIXME (#3300): Should allow items to be anonymous. Right now we just use dummy names for anon items. */ -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Item { pub ident: Ident, pub attrs: Vec<Attribute>, @@ -1610,7 +1610,7 @@ pub struct Item { pub span: Span, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum Item_ { // Optional location (containing arbitrary characters) from which // to fetch the crate sources. @@ -1661,7 +1661,7 @@ impl Item_ { } } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct ForeignItem { pub ident: Ident, pub attrs: Vec<Attribute>, @@ -1671,7 +1671,7 @@ pub struct ForeignItem { pub vis: Visibility, } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum ForeignItem_ { ForeignItemFn(P<FnDecl>, Generics), ForeignItemStatic(P<Ty>, /* is_mutbl */ bool), @@ -1686,7 +1686,7 @@ impl ForeignItem_ { } } -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum ClosureKind { FnClosureKind, FnMutClosureKind, @@ -1696,7 +1696,7 @@ pub enum ClosureKind { /// The data we save and restore about an inlined item or method. This is not /// part of the AST that we parse from a file, but it becomes part of the tree /// that we trans. -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum InlinedItem { IIItem(P<Item>), IITraitItem(DefId /* impl id */, TraitItem), @@ -1707,7 +1707,7 @@ pub enum InlinedItem { /// A macro definition, in this crate or imported from another. /// /// Not parsed directly, but created on macro import or `macro_rules!` expansion. -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct MacroDef { pub ident: Ident, pub attrs: Vec<Attribute>, diff --git a/src/libsyntax/ast_map/mod.rs b/src/libsyntax/ast_map/mod.rs index 96476cabac5..81c03fdfb9b 100644 --- a/src/libsyntax/ast_map/mod.rs +++ b/src/libsyntax/ast_map/mod.rs @@ -32,7 +32,7 @@ use std::slice; pub mod blocks; -#[derive(Clone, Copy, PartialEq, Show)] +#[derive(Clone, Copy, PartialEq, Debug)] pub enum PathElem { PathMod(Name), PathName(Name) @@ -104,7 +104,7 @@ pub fn path_to_string<PI: Iterator<Item=PathElem>>(path: PI) -> String { }).to_string() } -#[derive(Copy, Show)] +#[derive(Copy, Debug)] pub enum Node<'ast> { NodeItem(&'ast Item), NodeForeignItem(&'ast ForeignItem), @@ -126,7 +126,7 @@ pub enum Node<'ast> { /// Represents an entry and its parent Node ID /// The odd layout is to bring down the total size. -#[derive(Copy, Show)] +#[derive(Copy, Debug)] enum MapEntry<'ast> { /// Placeholder for holes in the map. NotPresent, @@ -157,7 +157,7 @@ impl<'ast> Clone for MapEntry<'ast> { } } -#[derive(Show)] +#[derive(Debug)] struct InlinedParent { path: Vec<PathElem>, ii: InlinedItem diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs index 5aeea47ac60..a1281a1f689 100644 --- a/src/libsyntax/ast_util.rs +++ b/src/libsyntax/ast_util.rs @@ -352,7 +352,7 @@ pub fn empty_generics() -> Generics { // ______________________________________________________________________ // Enumerating the IDs which appear in an AST -#[derive(RustcEncodable, RustcDecodable, Show, Copy)] +#[derive(RustcEncodable, RustcDecodable, Debug, Copy)] pub struct IdRange { pub min: NodeId, pub max: NodeId, diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs index 061600d9420..4427a7aaf02 100644 --- a/src/libsyntax/attr.rs +++ b/src/libsyntax/attr.rs @@ -346,7 +346,7 @@ pub fn cfg_matches(diagnostic: &SpanHandler, cfgs: &[P<MetaItem>], cfg: &ast::Me } /// Represents the #[deprecated] and friends attributes. -#[derive(RustcEncodable,RustcDecodable,Clone,Show)] +#[derive(RustcEncodable,RustcDecodable,Clone,Debug)] pub struct Stability { pub level: StabilityLevel, pub feature: InternedString, @@ -358,7 +358,7 @@ pub struct Stability { } /// The available stability levels. -#[derive(RustcEncodable,RustcDecodable,PartialEq,PartialOrd,Clone,Show,Copy)] +#[derive(RustcEncodable,RustcDecodable,PartialEq,PartialOrd,Clone,Debug,Copy)] pub enum StabilityLevel { Unstable, Stable, @@ -570,7 +570,7 @@ fn int_type_of_word(s: &str) -> Option<IntType> { } } -#[derive(PartialEq, Show, RustcEncodable, RustcDecodable, Copy)] +#[derive(PartialEq, Debug, RustcEncodable, RustcDecodable, Copy)] pub enum ReprAttr { ReprAny, ReprInt(Span, IntType), @@ -589,7 +589,7 @@ impl ReprAttr { } } -#[derive(Eq, Hash, PartialEq, Show, RustcEncodable, RustcDecodable, Copy)] +#[derive(Eq, Hash, PartialEq, Debug, RustcEncodable, RustcDecodable, Copy)] pub enum IntType { SignedInt(ast::IntTy), UnsignedInt(ast::UintTy) diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index f93a8b4b317..8adb9b24222 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -36,13 +36,13 @@ pub trait Pos { /// A byte offset. Keep this small (currently 32-bits), as AST contains /// a lot of them. -#[derive(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Show)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Debug)] pub struct BytePos(pub u32); /// A character offset. Because of multibyte utf8 characters, a byte offset /// is not equivalent to a character offset. The CodeMap will convert BytePos /// values to CharPos values as necessary. -#[derive(Copy, PartialEq, Hash, PartialOrd, Show)] +#[derive(Copy, PartialEq, Hash, PartialOrd, Debug)] pub struct CharPos(pub usize); // FIXME: Lots of boilerplate in these impls, but so far my attempts to fix @@ -94,7 +94,7 @@ impl Sub for CharPos { /// are *absolute* positions from the beginning of the codemap, not positions /// relative to FileMaps. Methods on the CodeMap can be used to relate spans back /// to the original source. -#[derive(Clone, Copy, Show, Hash)] +#[derive(Clone, Copy, Debug, Hash)] pub struct Span { pub lo: BytePos, pub hi: BytePos, @@ -110,7 +110,7 @@ pub const COMMAND_LINE_SP: Span = Span { lo: BytePos(0), hi: BytePos(0), expn_id: COMMAND_LINE_EXPN }; -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub struct Spanned<T> { pub node: T, pub span: Span, @@ -193,7 +193,7 @@ pub struct FileMapAndLine { pub fm: Rc<FileMap>, pub line: usize } pub struct FileMapAndBytePos { pub fm: Rc<FileMap>, pub pos: BytePos } /// The syntax with which a macro was invoked. -#[derive(Clone, Copy, Hash, Show)] +#[derive(Clone, Copy, Hash, Debug)] pub enum MacroFormat { /// e.g. #[derive(...)] <item> MacroAttribute, @@ -201,7 +201,7 @@ pub enum MacroFormat { MacroBang } -#[derive(Clone, Hash, Show)] +#[derive(Clone, Hash, Debug)] pub struct NameAndSpan { /// The name of the macro that was invoked to create the thing /// with this Span. @@ -215,7 +215,7 @@ pub struct NameAndSpan { } /// Extra information for tracking macro expansion of spans -#[derive(Hash, Show)] +#[derive(Hash, Debug)] pub struct ExpnInfo { /// The location of the actual macro invocation, e.g. `let x = /// foo!();` @@ -236,7 +236,7 @@ pub struct ExpnInfo { pub callee: NameAndSpan } -#[derive(PartialEq, Eq, Clone, Show, Hash, RustcEncodable, RustcDecodable, Copy)] +#[derive(PartialEq, Eq, Clone, Debug, Hash, RustcEncodable, RustcDecodable, Copy)] pub struct ExpnId(u32); pub const NO_EXPANSION: ExpnId = ExpnId(-1); diff --git a/src/libsyntax/diagnostic.rs b/src/libsyntax/diagnostic.rs index 048bcfc6b72..821ac8e2f89 100644 --- a/src/libsyntax/diagnostic.rs +++ b/src/libsyntax/diagnostic.rs @@ -234,7 +234,7 @@ pub fn mk_handler(can_emit_warnings: bool, e: Box<Emitter + Send>) -> Handler { } } -#[derive(Copy, PartialEq, Clone, Show)] +#[derive(Copy, PartialEq, Clone, Debug)] pub enum Level { Bug, Fatal, diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index dd89153d497..a184cc5c2b2 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -73,7 +73,7 @@ impl<F> ItemModifier for F } } -#[derive(Show,Clone)] +#[derive(Debug,Clone)] pub enum Annotatable { Item(P<ast::Item>), TraitItem(ast::TraitItem), diff --git a/src/libsyntax/ext/deriving/generic/mod.rs b/src/libsyntax/ext/deriving/generic/mod.rs index 7f4f5e6ead6..1b84d93738d 100644 --- a/src/libsyntax/ext/deriving/generic/mod.rs +++ b/src/libsyntax/ext/deriving/generic/mod.rs @@ -1154,7 +1154,7 @@ impl<'a> MethodDef<'a> { // to an uninhabited type (e.g. a zero-variant enum or a // type holding such an enum), but do not feature-gate // zero-variant enums themselves, then attempting to - // derive Show on such a type could here generate code + // derive Debug on such a type could here generate code // that needs the feature gate enabled.) return cx.expr_unreachable(sp); diff --git a/src/libsyntax/ext/mtwt.rs b/src/libsyntax/ext/mtwt.rs index 7adc443759f..b6563d77b88 100644 --- a/src/libsyntax/ext/mtwt.rs +++ b/src/libsyntax/ext/mtwt.rs @@ -38,7 +38,7 @@ pub struct SCTable { rename_memo: RefCell<HashMap<(SyntaxContext,Ident,Name),SyntaxContext>>, } -#[derive(PartialEq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(PartialEq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] pub enum SyntaxContext_ { EmptyCtxt, Mark (Mrk,SyntaxContext), @@ -309,7 +309,7 @@ mod tests { // because of the SCTable, I now need a tidy way of // creating syntax objects. Sigh. - #[derive(Clone, PartialEq, Show)] + #[derive(Clone, PartialEq, Debug)] enum TestSC { M(Mrk), R(Ident,Name) diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index 417e440844a..493a97c24cf 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -52,7 +52,7 @@ pub trait Reader { } } -#[derive(Clone, PartialEq, Eq, Show)] +#[derive(Clone, PartialEq, Eq, Debug)] pub struct TokenAndSpan { pub tok: token::Token, pub sp: Span, diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index ac694afac6b..1ef33a2401e 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -29,7 +29,7 @@ use std::path::BytesContainer; use std::rc::Rc; #[allow(non_camel_case_types)] -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)] pub enum BinOpToken { Plus, Minus, @@ -44,7 +44,7 @@ pub enum BinOpToken { } /// A delimiter token -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)] pub enum DelimToken { /// A round parenthesis: `(` or `)` Paren, @@ -54,14 +54,14 @@ pub enum DelimToken { Brace, } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)] pub enum IdentStyle { /// `::` follows the identifier with no whitespace in-between. ModName, Plain, } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)] pub enum SpecialMacroVar { /// `$crate` will be filled in with the name of the crate a macro was /// imported from, if any. @@ -76,7 +76,7 @@ impl SpecialMacroVar { } } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)] pub enum Lit { Byte(ast::Name), Char(ast::Name), @@ -102,7 +102,7 @@ impl Lit { } #[allow(non_camel_case_types)] -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug)] pub enum Token { /* Expression-operator symbols. */ Eq, diff --git a/src/libterm/terminfo/mod.rs b/src/libterm/terminfo/mod.rs index a8df045e203..d126717ce68 100644 --- a/src/libterm/terminfo/mod.rs +++ b/src/libterm/terminfo/mod.rs @@ -24,7 +24,7 @@ use self::parm::{expand, Number, Variables}; /// A parsed terminfo database entry. -#[derive(Show)] +#[derive(Debug)] pub struct TermInfo { /// Names for the terminal pub names: Vec<String> , diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 14bedec0484..88a84b4c9da 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -97,7 +97,7 @@ pub mod stats; // colons. This way if some test runner wants to arrange the tests // hierarchically it may. -#[derive(Clone, PartialEq, Eq, Hash, Show)] +#[derive(Clone, PartialEq, Eq, Hash, Debug)] pub enum TestName { StaticTestName(&'static str), DynTestName(String) @@ -198,7 +198,7 @@ pub struct Bencher { pub bytes: u64, } -#[derive(Copy, Clone, Show, PartialEq, Eq, Hash)] +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] pub enum ShouldFail { No, Yes(Option<&'static str>) @@ -206,7 +206,7 @@ pub enum ShouldFail { // The definition of a single test. A test runner will run a list of // these. -#[derive(Clone, Show, PartialEq, Eq, Hash)] +#[derive(Clone, Debug, PartialEq, Eq, Hash)] pub struct TestDesc { pub name: TestName, pub ignore: bool, @@ -215,13 +215,13 @@ pub struct TestDesc { unsafe impl Send for TestDesc {} -#[derive(Show)] +#[derive(Debug)] pub struct TestDescAndFn { pub desc: TestDesc, pub testfn: TestFn, } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show, Copy)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug, Copy)] pub struct Metric { value: f64, noise: f64 diff --git a/src/libunicode/u_str.rs b/src/libunicode/u_str.rs index b4bafe31ff2..370f59a5b26 100644 --- a/src/libunicode/u_str.rs +++ b/src/libunicode/u_str.rs @@ -410,7 +410,7 @@ pub struct Utf16Items<'a> { iter: slice::Iter<'a, u16> } /// The possibilities for values decoded from a `u16` stream. -#[derive(Copy, PartialEq, Eq, Clone, Show)] +#[derive(Copy, PartialEq, Eq, Clone, Debug)] pub enum Utf16Item { /// A valid codepoint. ScalarValue(char), diff --git a/src/rustbook/error.rs b/src/rustbook/error.rs index d4829a2c391..1c10a270acc 100644 --- a/src/rustbook/error.rs +++ b/src/rustbook/error.rs @@ -11,7 +11,7 @@ //! Error handling utilities. WIP. use std::fmt; -use std::fmt::{Show, Formatter}; +use std::fmt::{Debug, Formatter}; use std::old_io::IoError; @@ -32,7 +32,7 @@ pub trait FromError<E> { fn from_err(err: E) -> Self; } -impl Show for Box<Error + 'static> { +impl Debug for Box<Error + 'static> { fn fmt(&self, f: &mut Formatter) -> fmt::Result { write!(f, "{}", self.description()) } diff --git a/src/test/auxiliary/trait_inheritance_overloading_xc.rs b/src/test/auxiliary/trait_inheritance_overloading_xc.rs index cbd2ac69c78..36442ed6c19 100644 --- a/src/test/auxiliary/trait_inheritance_overloading_xc.rs +++ b/src/test/auxiliary/trait_inheritance_overloading_xc.rs @@ -14,7 +14,7 @@ use std::ops::{Add, Sub, Mul}; pub trait MyNum : Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + PartialEq + Clone { } -#[derive(Clone, Show)] +#[derive(Clone, Debug)] pub struct MyInt { pub val: int } diff --git a/src/test/bench/shootout-chameneos-redux.rs b/src/test/bench/shootout-chameneos-redux.rs index c30b68dbe68..7fad2c9b4be 100644 --- a/src/test/bench/shootout-chameneos-redux.rs +++ b/src/test/bench/shootout-chameneos-redux.rs @@ -61,7 +61,7 @@ enum Color { Blue, } -impl fmt::Show for Color { +impl fmt::Debug for Color { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let str = match *self { Red => "red", @@ -104,7 +104,7 @@ fn show_digit(nn: uint) -> &'static str { } struct Number(uint); -impl fmt::Show for Number { +impl fmt::Debug for Number { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let mut out = vec![]; let Number(mut num) = *self; diff --git a/src/test/compile-fail/attr-before-eof.rs b/src/test/compile-fail/attr-before-eof.rs index 5fe88cafacf..e34756229bd 100644 --- a/src/test/compile-fail/attr-before-eof.rs +++ b/src/test/compile-fail/attr-before-eof.rs @@ -8,4 +8,4 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(Show)] //~ERROR expected item after attributes +#[derive(Debug)] //~ERROR expected item after attributes diff --git a/src/test/compile-fail/borrowck-move-out-of-vec-tail.rs b/src/test/compile-fail/borrowck-move-out-of-vec-tail.rs index 75596af10d7..4e7d81a1cb0 100644 --- a/src/test/compile-fail/borrowck-move-out-of-vec-tail.rs +++ b/src/test/compile-fail/borrowck-move-out-of-vec-tail.rs @@ -10,7 +10,7 @@ // Test that we do not permit moves from &[] matched by a vec pattern. -#[derive(Clone, Show)] +#[derive(Clone, Debug)] struct Foo { string: String } diff --git a/src/test/compile-fail/copy-a-resource.rs b/src/test/compile-fail/copy-a-resource.rs index 1201db437b9..98402591e72 100644 --- a/src/test/compile-fail/copy-a-resource.rs +++ b/src/test/compile-fail/copy-a-resource.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(Show)] +#[derive(Debug)] struct foo { i: isize, } diff --git a/src/test/compile-fail/deriving-span-Show-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-Show-enum-struct-variant.rs index aefc990c187..1d9099e8ed6 100644 --- a/src/test/compile-fail/deriving-span-Show-enum-struct-variant.rs +++ b/src/test/compile-fail/deriving-span-Show-enum-struct-variant.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[derive(Show)] +#[derive(Debug)] enum Enum { A { x: Error //~ ERROR diff --git a/src/test/compile-fail/deriving-span-Show-enum.rs b/src/test/compile-fail/deriving-span-Show-enum.rs index bdd2c21a1b6..ab31ca95bdb 100644 --- a/src/test/compile-fail/deriving-span-Show-enum.rs +++ b/src/test/compile-fail/deriving-span-Show-enum.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[derive(Show)] +#[derive(Debug)] enum Enum { A( Error //~ ERROR diff --git a/src/test/compile-fail/deriving-span-Show-struct.rs b/src/test/compile-fail/deriving-span-Show-struct.rs index f76317e62b4..eb8ac4649f2 100644 --- a/src/test/compile-fail/deriving-span-Show-struct.rs +++ b/src/test/compile-fail/deriving-span-Show-struct.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[derive(Show)] +#[derive(Debug)] struct Struct { x: Error //~ ERROR } diff --git a/src/test/compile-fail/deriving-span-Show-tuple-struct.rs b/src/test/compile-fail/deriving-span-Show-tuple-struct.rs index cb64a438e0b..b93db4ab535 100644 --- a/src/test/compile-fail/deriving-span-Show-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-Show-tuple-struct.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[derive(Show)] +#[derive(Debug)] struct Struct( Error //~ ERROR ); diff --git a/src/test/compile-fail/doc-before-attr.rs b/src/test/compile-fail/doc-before-attr.rs index 7ee7e196b6b..bb44a6a8abb 100644 --- a/src/test/compile-fail/doc-before-attr.rs +++ b/src/test/compile-fail/doc-before-attr.rs @@ -9,4 +9,4 @@ // except according to those terms. /// hi -#[derive(Show)] //~ERROR expected item after attributes +#[derive(Debug)] //~ERROR expected item after attributes diff --git a/src/test/compile-fail/issue-17728.rs b/src/test/compile-fail/issue-17728.rs index 66ef7b807f7..6d827fb86e2 100644 --- a/src/test/compile-fail/issue-17728.rs +++ b/src/test/compile-fail/issue-17728.rs @@ -30,7 +30,7 @@ trait TraversesWorld { } -#[derive(Show, Eq, PartialEq, Hash)] +#[derive(Debug, Eq, PartialEq, Hash)] enum RoomDirection { West, East, @@ -97,7 +97,7 @@ impl Player { impl TraversesWorld for Player { } -impl Show for Player { +impl Debug for Player { fn fmt(&self, formatter: &mut Formatter) -> Result<(), Error> { formatter.write_str("Player{ name:"); formatter.write_str(self.name.as_slice()); diff --git a/src/test/compile-fail/issue-17905.rs b/src/test/compile-fail/issue-17905.rs index 9d1047f68e6..d5973abc462 100644 --- a/src/test/compile-fail/issue-17905.rs +++ b/src/test/compile-fail/issue-17905.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(Show)] +#[derive(Debug)] struct Pair<T, V> (T, V); impl Pair< diff --git a/src/test/compile-fail/issue-3521.rs b/src/test/compile-fail/issue-3521.rs index 67ab5508ec2..c49959c16a6 100644 --- a/src/test/compile-fail/issue-3521.rs +++ b/src/test/compile-fail/issue-3521.rs @@ -11,7 +11,7 @@ fn main() { let foo = 100; - #[derive(Show)] + #[derive(Debug)] enum Stuff { Bar = foo //~ ERROR attempt to use a non-constant value in a constant } diff --git a/src/test/compile-fail/no-send-res-ports.rs b/src/test/compile-fail/no-send-res-ports.rs index 52335ab76bd..ae2847aab09 100644 --- a/src/test/compile-fail/no-send-res-ports.rs +++ b/src/test/compile-fail/no-send-res-ports.rs @@ -13,11 +13,11 @@ use std::thread::Thread; use std::rc::Rc; -#[derive(Show)] +#[derive(Debug)] struct Port<T>(Rc<T>); fn main() { - #[derive(Show)] + #[derive(Debug)] struct foo { _x: Port<()>, } diff --git a/src/test/compile-fail/noncopyable-class.rs b/src/test/compile-fail/noncopyable-class.rs index 029b8485993..df135c3a8e3 100644 --- a/src/test/compile-fail/noncopyable-class.rs +++ b/src/test/compile-fail/noncopyable-class.rs @@ -11,7 +11,7 @@ // Test that a class with a non-copyable field can't be // copied -#[derive(Show)] +#[derive(Debug)] struct bar { x: isize, } @@ -26,7 +26,7 @@ fn bar(x:isize) -> bar { } } -#[derive(Show)] +#[derive(Debug)] struct foo { i: isize, j: bar, diff --git a/src/test/compile-fail/nonscalar-cast.rs b/src/test/compile-fail/nonscalar-cast.rs index f32c96b7b64..d6f274da967 100644 --- a/src/test/compile-fail/nonscalar-cast.rs +++ b/src/test/compile-fail/nonscalar-cast.rs @@ -10,7 +10,7 @@ // error-pattern:non-scalar cast -#[derive(Show)] +#[derive(Debug)] struct foo { x: isize } diff --git a/src/test/compile-fail/packed-struct-transmute.rs b/src/test/compile-fail/packed-struct-transmute.rs index b80dd0b36ed..1b164709ac7 100644 --- a/src/test/compile-fail/packed-struct-transmute.rs +++ b/src/test/compile-fail/packed-struct-transmute.rs @@ -23,7 +23,7 @@ struct Foo { baz: usize } -#[derive(Show)] +#[derive(Debug)] struct Oof { rab: u8, zab: usize diff --git a/src/test/compile-fail/unique-pinned-nocopy.rs b/src/test/compile-fail/unique-pinned-nocopy.rs index 04eaa3d7ae0..88535ee04fb 100644 --- a/src/test/compile-fail/unique-pinned-nocopy.rs +++ b/src/test/compile-fail/unique-pinned-nocopy.rs @@ -10,7 +10,7 @@ #![feature(box_syntax)] -#[derive(Show)] +#[derive(Debug)] struct r { b: bool, } diff --git a/src/test/compile-fail/unique-vec-res.rs b/src/test/compile-fail/unique-vec-res.rs index 4a84bb4c5ab..b9ddc3f4de9 100644 --- a/src/test/compile-fail/unique-vec-res.rs +++ b/src/test/compile-fail/unique-vec-res.rs @@ -14,7 +14,7 @@ use std::cell::Cell; -#[derive(Show)] +#[derive(Debug)] struct r<'a> { i: &'a Cell<isize>, } diff --git a/src/test/compile-fail/vec-res-add.rs b/src/test/compile-fail/vec-res-add.rs index 97a684b2459..cf64486c9c7 100644 --- a/src/test/compile-fail/vec-res-add.rs +++ b/src/test/compile-fail/vec-res-add.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(Show)] +#[derive(Debug)] struct r { i:isize } diff --git a/src/test/run-make/extern-fn-with-packed-struct/test.rs b/src/test/run-make/extern-fn-with-packed-struct/test.rs index 3e3f4c5948e..838ef338846 100644 --- a/src/test/run-make/extern-fn-with-packed-struct/test.rs +++ b/src/test/run-make/extern-fn-with-packed-struct/test.rs @@ -9,7 +9,7 @@ // except according to those terms. #[repr(packed)] -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] struct Foo { a: i8, b: i16, diff --git a/src/test/run-pass-fulldeps/macro-crate.rs b/src/test/run-pass-fulldeps/macro-crate.rs index 5236b35d4d2..a9e93aa8df5 100644 --- a/src/test/run-pass-fulldeps/macro-crate.rs +++ b/src/test/run-pass-fulldeps/macro-crate.rs @@ -17,11 +17,11 @@ extern crate macro_crate_test; #[into_foo] -#[derive(PartialEq, Clone, Show)] +#[derive(PartialEq, Clone, Debug)] fn foo() -> AFakeTypeThatHadBetterGoAway {} #[into_multi_foo] -#[derive(PartialEq, Clone, Show)] +#[derive(PartialEq, Clone, Debug)] fn foo() -> AnotherFakeTypeThatHadBetterGoAway {} trait Qux { diff --git a/src/test/run-pass/assert-eq-macro-success.rs b/src/test/run-pass/assert-eq-macro-success.rs index 089e1b8c5c2..8771ed7a742 100644 --- a/src/test/run-pass/assert-eq-macro-success.rs +++ b/src/test/run-pass/assert-eq-macro-success.rs @@ -11,7 +11,7 @@ #![allow(unknown_features)] #![feature(box_syntax)] -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] struct Point { x : int } pub fn main() { diff --git a/src/test/run-pass/auto-instantiate.rs b/src/test/run-pass/auto-instantiate.rs index 3c1e1f76580..0e2f6ef056e 100644 --- a/src/test/run-pass/auto-instantiate.rs +++ b/src/test/run-pass/auto-instantiate.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(Show)] +#[derive(Debug)] struct Pair<T, U> { a: T, b: U } struct Triple { x: int, y: int, z: int } diff --git a/src/test/run-pass/binops.rs b/src/test/run-pass/binops.rs index dc92910c927..30f10d23563 100644 --- a/src/test/run-pass/binops.rs +++ b/src/test/run-pass/binops.rs @@ -59,7 +59,7 @@ fn test_ptr() { } } -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] struct p { x: int, y: int, diff --git a/src/test/run-pass/borrowck-mut-uniq.rs b/src/test/run-pass/borrowck-mut-uniq.rs index b8e19d37026..747aca53324 100644 --- a/src/test/run-pass/borrowck-mut-uniq.rs +++ b/src/test/run-pass/borrowck-mut-uniq.rs @@ -13,7 +13,7 @@ use std::mem::swap; -#[derive(Show)] +#[derive(Debug)] struct Ints {sum: Box<int>, values: Vec<int> } fn add_int(x: &mut Ints, v: int) { diff --git a/src/test/run-pass/class-impl-very-parameterized-trait.rs b/src/test/run-pass/class-impl-very-parameterized-trait.rs index 7e7c1638e73..83e7df1c711 100644 --- a/src/test/run-pass/class-impl-very-parameterized-trait.rs +++ b/src/test/run-pass/class-impl-very-parameterized-trait.rs @@ -11,7 +11,7 @@ use std::cmp; -#[derive(Copy, Show)] +#[derive(Copy, Debug)] enum cat_type { tuxedo, tabby, tortoiseshell } impl cmp::PartialEq for cat_type { diff --git a/src/test/run-pass/const-struct.rs b/src/test/run-pass/const-struct.rs index b2073a8ff28..27c514160c0 100644 --- a/src/test/run-pass/const-struct.rs +++ b/src/test/run-pass/const-struct.rs @@ -10,7 +10,7 @@ use std::cmp; -#[derive(Show)] +#[derive(Debug)] struct foo { a: int, b: int, c: int } impl cmp::PartialEq for foo { diff --git a/src/test/run-pass/deriving-global.rs b/src/test/run-pass/deriving-global.rs index 849733ecc1f..6777cbdab96 100644 --- a/src/test/run-pass/deriving-global.rs +++ b/src/test/run-pass/deriving-global.rs @@ -20,21 +20,21 @@ mod submod { #[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, - Show, Rand, + Debug, Rand, Encodable, Decodable)] enum A { A1(uint), A2(int) } #[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, - Show, Rand, + Debug, Rand, Encodable, Decodable)] struct B { x: uint, y: int } #[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, - Show, Rand, + Debug, Rand, Encodable, Decodable)] struct C(uint, int); diff --git a/src/test/run-pass/deriving-in-fn.rs b/src/test/run-pass/deriving-in-fn.rs index cd79f84b7cb..bf2c2b01e6a 100644 --- a/src/test/run-pass/deriving-in-fn.rs +++ b/src/test/run-pass/deriving-in-fn.rs @@ -9,7 +9,7 @@ // except according to those terms. pub fn main() { - #[derive(Show)] + #[derive(Debug)] struct Foo { foo: int, } diff --git a/src/test/run-pass/deriving-primitive.rs b/src/test/run-pass/deriving-primitive.rs index 7ea9f6f19a0..eb3cb30594e 100644 --- a/src/test/run-pass/deriving-primitive.rs +++ b/src/test/run-pass/deriving-primitive.rs @@ -11,7 +11,7 @@ use std::num::FromPrimitive; use std::int; -#[derive(PartialEq, FromPrimitive, Show)] +#[derive(PartialEq, FromPrimitive, Debug)] enum A { Foo = int::MAX, Bar = 1, diff --git a/src/test/run-pass/deriving-via-extension-c-enum.rs b/src/test/run-pass/deriving-via-extension-c-enum.rs index d6594290b23..92ffd82d902 100644 --- a/src/test/run-pass/deriving-via-extension-c-enum.rs +++ b/src/test/run-pass/deriving-via-extension-c-enum.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] enum Foo { Bar, Baz, diff --git a/src/test/run-pass/deriving-via-extension-enum.rs b/src/test/run-pass/deriving-via-extension-enum.rs index 5d009655fce..9761a87d4aa 100644 --- a/src/test/run-pass/deriving-via-extension-enum.rs +++ b/src/test/run-pass/deriving-via-extension-enum.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] enum Foo { Bar(int, int), Baz(f64, f64) diff --git a/src/test/run-pass/deriving-via-extension-struct-empty.rs b/src/test/run-pass/deriving-via-extension-struct-empty.rs index d3c1c468f7c..9c929940eba 100644 --- a/src/test/run-pass/deriving-via-extension-struct-empty.rs +++ b/src/test/run-pass/deriving-via-extension-struct-empty.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] struct Foo; pub fn main() { diff --git a/src/test/run-pass/deriving-via-extension-struct-like-enum-variant.rs b/src/test/run-pass/deriving-via-extension-struct-like-enum-variant.rs index 5e60818731b..ed92a3baab9 100644 --- a/src/test/run-pass/deriving-via-extension-struct-like-enum-variant.rs +++ b/src/test/run-pass/deriving-via-extension-struct-like-enum-variant.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] enum S { X { x: int, y: int }, Y diff --git a/src/test/run-pass/deriving-via-extension-struct-tuple.rs b/src/test/run-pass/deriving-via-extension-struct-tuple.rs index a8a06244b20..9319a4f752d 100644 --- a/src/test/run-pass/deriving-via-extension-struct-tuple.rs +++ b/src/test/run-pass/deriving-via-extension-struct-tuple.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] struct Foo(int, int, String); pub fn main() { diff --git a/src/test/run-pass/deriving-via-extension-struct.rs b/src/test/run-pass/deriving-via-extension-struct.rs index 86a0ec15c83..e32e080cacb 100644 --- a/src/test/run-pass/deriving-via-extension-struct.rs +++ b/src/test/run-pass/deriving-via-extension-struct.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] struct Foo { x: int, y: int, diff --git a/src/test/run-pass/deriving-via-extension-type-params.rs b/src/test/run-pass/deriving-via-extension-type-params.rs index 266c51d1b66..890b4e69783 100644 --- a/src/test/run-pass/deriving-via-extension-type-params.rs +++ b/src/test/run-pass/deriving-via-extension-type-params.rs @@ -9,7 +9,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(PartialEq, Hash, Show)] +#[derive(PartialEq, Hash, Debug)] struct Foo<T> { x: int, y: T, diff --git a/src/test/run-pass/drop-trait-enum.rs b/src/test/run-pass/drop-trait-enum.rs index 9bfb3572ab5..2474bb8a4f3 100644 --- a/src/test/run-pass/drop-trait-enum.rs +++ b/src/test/run-pass/drop-trait-enum.rs @@ -14,7 +14,7 @@ use std::thread::Thread; use std::sync::mpsc::{channel, Sender}; -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] enum Message { Dropped, DestructorRan diff --git a/src/test/run-pass/empty-tag.rs b/src/test/run-pass/empty-tag.rs index 35c394cf535..65575945945 100644 --- a/src/test/run-pass/empty-tag.rs +++ b/src/test/run-pass/empty-tag.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(Copy, Show)] +#[derive(Copy, Debug)] enum chan { chan_t, } impl PartialEq for chan { diff --git a/src/test/run-pass/enum-discrim-width-stuff.rs b/src/test/run-pass/enum-discrim-width-stuff.rs index c323bff254d..0242e53aa8c 100644 --- a/src/test/run-pass/enum-discrim-width-stuff.rs +++ b/src/test/run-pass/enum-discrim-width-stuff.rs @@ -12,7 +12,7 @@ macro_rules! check { ($m:ident, $t:ty, $v:expr) => {{ mod $m { use std::mem::size_of; - #[derive(Copy, Show)] + #[derive(Copy, Debug)] enum E { V = $v, A = 0 diff --git a/src/test/run-pass/expr-if-struct.rs b/src/test/run-pass/expr-if-struct.rs index f1457829d03..ee2c0715043 100644 --- a/src/test/run-pass/expr-if-struct.rs +++ b/src/test/run-pass/expr-if-struct.rs @@ -22,7 +22,7 @@ fn test_rec() { assert_eq!(rs.i, 100); } -#[derive(Copy, Show)] +#[derive(Copy, Debug)] enum mood { happy, sad, } impl PartialEq for mood { diff --git a/src/test/run-pass/expr-match-struct.rs b/src/test/run-pass/expr-match-struct.rs index 1b5a33dff3d..e4ce71200b5 100644 --- a/src/test/run-pass/expr-match-struct.rs +++ b/src/test/run-pass/expr-match-struct.rs @@ -21,7 +21,7 @@ fn test_rec() { assert_eq!(rs.i, 100); } -#[derive(Copy, Show)] +#[derive(Copy, Debug)] enum mood { happy, sad, } impl PartialEq for mood { diff --git a/src/test/run-pass/extern-pass-TwoU16s.rs b/src/test/run-pass/extern-pass-TwoU16s.rs index f7aef2e59c9..1f48dc3bcf1 100644 --- a/src/test/run-pass/extern-pass-TwoU16s.rs +++ b/src/test/run-pass/extern-pass-TwoU16s.rs @@ -11,7 +11,7 @@ // Test a foreign function that accepts and returns a struct // by value. -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub struct TwoU16s { one: u16, two: u16 } diff --git a/src/test/run-pass/extern-pass-TwoU32s.rs b/src/test/run-pass/extern-pass-TwoU32s.rs index 8e13017fdbf..171e2a647cc 100644 --- a/src/test/run-pass/extern-pass-TwoU32s.rs +++ b/src/test/run-pass/extern-pass-TwoU32s.rs @@ -11,7 +11,7 @@ // Test a foreign function that accepts and returns a struct // by value. -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub struct TwoU32s { one: u32, two: u32 } diff --git a/src/test/run-pass/extern-pass-TwoU64s.rs b/src/test/run-pass/extern-pass-TwoU64s.rs index b95eb7974b6..83555f6bb1d 100644 --- a/src/test/run-pass/extern-pass-TwoU64s.rs +++ b/src/test/run-pass/extern-pass-TwoU64s.rs @@ -11,7 +11,7 @@ // Test a foreign function that accepts and returns a struct // by value. -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub struct TwoU64s { one: u64, two: u64 } diff --git a/src/test/run-pass/extern-pass-TwoU8s.rs b/src/test/run-pass/extern-pass-TwoU8s.rs index d5c727be4bc..d2b13445e6a 100644 --- a/src/test/run-pass/extern-pass-TwoU8s.rs +++ b/src/test/run-pass/extern-pass-TwoU8s.rs @@ -11,7 +11,7 @@ // Test a foreign function that accepts and returns a struct // by value. -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] pub struct TwoU8s { one: u8, two: u8 } diff --git a/src/test/run-pass/functional-struct-upd.rs b/src/test/run-pass/functional-struct-upd.rs index 5f2ebc6cbed..8c686aba5f3 100644 --- a/src/test/run-pass/functional-struct-upd.rs +++ b/src/test/run-pass/functional-struct-upd.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(Show)] +#[derive(Debug)] struct Foo { x: int, y: int diff --git a/src/test/run-pass/generic-default-type-params.rs b/src/test/run-pass/generic-default-type-params.rs index 5ec478d39e3..e7ef1d42f5f 100644 --- a/src/test/run-pass/generic-default-type-params.rs +++ b/src/test/run-pass/generic-default-type-params.rs @@ -47,10 +47,10 @@ fn default_foo(x: Foo) { assert_eq!(x.baz(), (1, 'a')); } -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] struct BazHelper<T>(T); -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] // Ensure that we can use previous type parameters in defaults. struct Baz<T, U = BazHelper<T>, V = Option<U>>(T, U, V); diff --git a/src/test/run-pass/issue-10396.rs b/src/test/run-pass/issue-10396.rs index 308783f0d4b..7095812ce4b 100644 --- a/src/test/run-pass/issue-10396.rs +++ b/src/test/run-pass/issue-10396.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(Show)] +#[derive(Debug)] enum Foo<'s> { V(&'s str) } diff --git a/src/test/run-pass/issue-13434.rs b/src/test/run-pass/issue-13434.rs index 35e487539fa..95370144125 100644 --- a/src/test/run-pass/issue-13434.rs +++ b/src/test/run-pass/issue-13434.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(Show)] +#[derive(Debug)] struct MyStruct; trait Repro { diff --git a/src/test/run-pass/issue-14021.rs b/src/test/run-pass/issue-14021.rs index 509459a2ab3..8f76e9fb4c1 100644 --- a/src/test/run-pass/issue-14021.rs +++ b/src/test/run-pass/issue-14021.rs @@ -15,7 +15,7 @@ extern crate serialize; use serialize::{Encodable, Decodable}; use serialize::json; -#[derive(Encodable, Decodable, PartialEq, Show)] +#[derive(Encodable, Decodable, PartialEq, Debug)] struct UnitLikeStruct; pub fn main() { diff --git a/src/test/run-pass/issue-15763.rs b/src/test/run-pass/issue-15763.rs index 283ea25b6fe..f30991a1963 100644 --- a/src/test/run-pass/issue-15763.rs +++ b/src/test/run-pass/issue-15763.rs @@ -11,7 +11,7 @@ #![allow(unknown_features)] #![feature(box_syntax)] -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] struct Bar { x: int } @@ -21,7 +21,7 @@ impl Drop for Bar { } } -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] struct Foo { x: Bar, a: int diff --git a/src/test/run-pass/issue-19135.rs b/src/test/run-pass/issue-19135.rs index c90880ff120..9557d7e4fa8 100644 --- a/src/test/run-pass/issue-19135.rs +++ b/src/test/run-pass/issue-19135.rs @@ -10,7 +10,7 @@ #![feature(unboxed_closures)] -#[derive(Show)] +#[derive(Debug)] struct LifetimeStruct<'a>; fn main() { diff --git a/src/test/run-pass/issue-19358.rs b/src/test/run-pass/issue-19358.rs index 36093482175..37d05453914 100644 --- a/src/test/run-pass/issue-19358.rs +++ b/src/test/run-pass/issue-19358.rs @@ -10,12 +10,12 @@ trait Trait {} -#[derive(Show)] +#[derive(Debug)] struct Foo<T: Trait> { foo: T, } -#[derive(Show)] +#[derive(Debug)] struct Bar<T> where T: Trait { bar: T, } diff --git a/src/test/run-pass/issue-2718.rs b/src/test/run-pass/issue-2718.rs index 6f5f46edc01..b8a541a0fc4 100644 --- a/src/test/run-pass/issue-2718.rs +++ b/src/test/run-pass/issue-2718.rs @@ -33,7 +33,7 @@ pub mod pipes { payload: Option<T> } - #[derive(PartialEq, Show)] + #[derive(PartialEq, Debug)] #[repr(int)] pub enum state { empty, diff --git a/src/test/run-pass/issue-2904.rs b/src/test/run-pass/issue-2904.rs index 27ac538b5b3..8a67d84cb64 100644 --- a/src/test/run-pass/issue-2904.rs +++ b/src/test/run-pass/issue-2904.rs @@ -27,7 +27,7 @@ enum square { empty } -impl fmt::Show for square { +impl fmt::Debug for square { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", match *self { bot => { "R".to_string() } diff --git a/src/test/run-pass/issue-3556.rs b/src/test/run-pass/issue-3556.rs index 3448273e144..2bd270f9b0f 100644 --- a/src/test/run-pass/issue-3556.rs +++ b/src/test/run-pass/issue-3556.rs @@ -9,7 +9,7 @@ // except according to those terms. -#[derive(Show)] +#[derive(Debug)] enum Token { Text(String), ETag(Vec<String>, String), diff --git a/src/test/run-pass/issue-3794.rs b/src/test/run-pass/issue-3794.rs index 91c938981c1..6ac252c07ef 100644 --- a/src/test/run-pass/issue-3794.rs +++ b/src/test/run-pass/issue-3794.rs @@ -15,7 +15,7 @@ trait T { fn print(&self); } -#[derive(Show)] +#[derive(Debug)] struct S { s: int, } diff --git a/src/test/run-pass/issue-7563.rs b/src/test/run-pass/issue-7563.rs index 734d131ffdf..eda2057f6d6 100644 --- a/src/test/run-pass/issue-7563.rs +++ b/src/test/run-pass/issue-7563.rs @@ -12,9 +12,9 @@ trait IDummy { fn do_nothing(&self); } -#[derive(Show)] +#[derive(Debug)] struct A { a: int } -#[derive(Show)] +#[derive(Debug)] struct B<'a> { b: int, pa: &'a A } impl IDummy for A { diff --git a/src/test/run-pass/log-poly.rs b/src/test/run-pass/log-poly.rs index a6a99d6fc92..ce598c5d382 100644 --- a/src/test/run-pass/log-poly.rs +++ b/src/test/run-pass/log-poly.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(Show)] +#[derive(Debug)] enum Numbers { Three } diff --git a/src/test/run-pass/logging-only-prints-once.rs b/src/test/run-pass/logging-only-prints-once.rs index a72cfad2cb8..644efe20ded 100644 --- a/src/test/run-pass/logging-only-prints-once.rs +++ b/src/test/run-pass/logging-only-prints-once.rs @@ -17,7 +17,7 @@ use std::thread::Thread; struct Foo(Cell<int>); -impl fmt::Show for Foo { +impl fmt::Debug for Foo { fn fmt(&self, _fmt: &mut fmt::Formatter) -> fmt::Result { let Foo(ref f) = *self; assert!(f.get() == 0); diff --git a/src/test/run-pass/monomorphize-abi-alignment.rs b/src/test/run-pass/monomorphize-abi-alignment.rs index 8ec16419a22..726f205f5c4 100644 --- a/src/test/run-pass/monomorphize-abi-alignment.rs +++ b/src/test/run-pass/monomorphize-abi-alignment.rs @@ -27,10 +27,10 @@ impl<T> S<T> { } } -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] struct A((u32, u32)); -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] struct B(u64); pub fn main() { diff --git a/src/test/run-pass/new-impl-syntax.rs b/src/test/run-pass/new-impl-syntax.rs index 84d2083cedd..bd0a53b620c 100644 --- a/src/test/run-pass/new-impl-syntax.rs +++ b/src/test/run-pass/new-impl-syntax.rs @@ -15,7 +15,7 @@ struct Thingy { y: int } -impl fmt::Show for Thingy { +impl fmt::Debug for Thingy { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{{ x: {:?}, y: {:?} }}", self.x, self.y) } @@ -25,7 +25,7 @@ struct PolymorphicThingy<T> { x: T } -impl<T:fmt::Show> fmt::Show for PolymorphicThingy<T> { +impl<T:fmt::Debug> fmt::Debug for PolymorphicThingy<T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{:?}", self.x) } diff --git a/src/test/run-pass/newtype-temporary.rs b/src/test/run-pass/newtype-temporary.rs index d2523eac31e..5952258e46c 100644 --- a/src/test/run-pass/newtype-temporary.rs +++ b/src/test/run-pass/newtype-temporary.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] struct Foo(uint); fn foo() -> Foo { diff --git a/src/test/run-pass/operator-multidispatch.rs b/src/test/run-pass/operator-multidispatch.rs index 8e5750005e2..4ce6fcee8c7 100644 --- a/src/test/run-pass/operator-multidispatch.rs +++ b/src/test/run-pass/operator-multidispatch.rs @@ -13,7 +13,7 @@ use std::ops; -#[derive(Show,PartialEq,Eq)] +#[derive(Debug,PartialEq,Eq)] struct Point { x: int, y: int diff --git a/src/test/run-pass/operator-overloading.rs b/src/test/run-pass/operator-overloading.rs index c20b7336deb..3ddc666cd38 100644 --- a/src/test/run-pass/operator-overloading.rs +++ b/src/test/run-pass/operator-overloading.rs @@ -11,7 +11,7 @@ use std::cmp; use std::ops; -#[derive(Copy, Show)] +#[derive(Copy, Debug)] struct Point { x: int, y: int diff --git a/src/test/run-pass/overloaded-autoderef-count.rs b/src/test/run-pass/overloaded-autoderef-count.rs index f0646853b6b..cc36b625c35 100644 --- a/src/test/run-pass/overloaded-autoderef-count.rs +++ b/src/test/run-pass/overloaded-autoderef-count.rs @@ -48,7 +48,7 @@ impl<T> DerefMut for DerefCounter<T> { } } -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] struct Point { x: int, y: int diff --git a/src/test/run-pass/overloaded-autoderef.rs b/src/test/run-pass/overloaded-autoderef.rs index 5831d500b83..59e3a807d5a 100644 --- a/src/test/run-pass/overloaded-autoderef.rs +++ b/src/test/run-pass/overloaded-autoderef.rs @@ -15,7 +15,7 @@ use std::cell::RefCell; use std::rc::Rc; use std::num::ToPrimitive; -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] struct Point { x: int, y: int diff --git a/src/test/run-pass/overloaded-deref.rs b/src/test/run-pass/overloaded-deref.rs index a2cc7b7dfea..d02951e981e 100644 --- a/src/test/run-pass/overloaded-deref.rs +++ b/src/test/run-pass/overloaded-deref.rs @@ -15,7 +15,7 @@ use std::cell::RefCell; use std::rc::Rc; use std::string::String; -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] struct Point { x: int, y: int diff --git a/src/test/run-pass/packed-struct-vec.rs b/src/test/run-pass/packed-struct-vec.rs index 14607c9e24a..847688ce045 100644 --- a/src/test/run-pass/packed-struct-vec.rs +++ b/src/test/run-pass/packed-struct-vec.rs @@ -13,7 +13,7 @@ use std::mem; #[repr(packed)] -#[derive(Copy, PartialEq, Show)] +#[derive(Copy, PartialEq, Debug)] struct Foo { bar: u8, baz: u64 diff --git a/src/test/run-pass/regions-mock-tcx.rs b/src/test/run-pass/regions-mock-tcx.rs index eec4ee1be94..34ff7acfca4 100644 --- a/src/test/run-pass/regions-mock-tcx.rs +++ b/src/test/run-pass/regions-mock-tcx.rs @@ -27,7 +27,7 @@ use std::mem; type Type<'tcx> = &'tcx TypeStructure<'tcx>; -#[derive(Copy, Show)] +#[derive(Copy, Debug)] enum TypeStructure<'tcx> { TypeInt, TypeFunction(Type<'tcx>, Type<'tcx>), diff --git a/src/test/run-pass/resource-assign-is-not-copy.rs b/src/test/run-pass/resource-assign-is-not-copy.rs index 57f72b23adf..ff38b02ae76 100644 --- a/src/test/run-pass/resource-assign-is-not-copy.rs +++ b/src/test/run-pass/resource-assign-is-not-copy.rs @@ -12,7 +12,7 @@ use std::cell::Cell; -#[derive(Show)] +#[derive(Debug)] struct r<'a> { i: &'a Cell<int>, } diff --git a/src/test/run-pass/struct-lit-functional-no-fields.rs b/src/test/run-pass/struct-lit-functional-no-fields.rs index da40f10e9fa..ebf2fbbe53c 100644 --- a/src/test/run-pass/struct-lit-functional-no-fields.rs +++ b/src/test/run-pass/struct-lit-functional-no-fields.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(Show,PartialEq,Clone)] +#[derive(Debug,PartialEq,Clone)] struct Foo<T> { bar: T, baz: T diff --git a/src/test/run-pass/struct-partial-move-1.rs b/src/test/run-pass/struct-partial-move-1.rs index 043ca121b1b..8f75b763d96 100644 --- a/src/test/run-pass/struct-partial-move-1.rs +++ b/src/test/run-pass/struct-partial-move-1.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] pub struct Partial<T> { x: T, y: T } -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] struct S { val: int } impl S { fn new(v: int) -> S { S { val: v } } } impl Drop for S { fn drop(&mut self) { } } diff --git a/src/test/run-pass/struct-partial-move-2.rs b/src/test/run-pass/struct-partial-move-2.rs index 6327e03e528..377e9e6b89a 100644 --- a/src/test/run-pass/struct-partial-move-2.rs +++ b/src/test/run-pass/struct-partial-move-2.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] pub struct Partial<T> { x: T, y: T } -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] struct S { val: int } impl S { fn new(v: int) -> S { S { val: v } } } impl Drop for S { fn drop(&mut self) { } } diff --git a/src/test/run-pass/structured-compare.rs b/src/test/run-pass/structured-compare.rs index 9278ebebc53..d87ff64ebd9 100644 --- a/src/test/run-pass/structured-compare.rs +++ b/src/test/run-pass/structured-compare.rs @@ -10,7 +10,7 @@ -#[derive(Copy, Show)] +#[derive(Copy, Debug)] enum foo { large, small, } impl PartialEq for foo { diff --git a/src/test/run-pass/tag-disr-val-shape.rs b/src/test/run-pass/tag-disr-val-shape.rs index 049e4bb9a38..fba3f9fb0d0 100644 --- a/src/test/run-pass/tag-disr-val-shape.rs +++ b/src/test/run-pass/tag-disr-val-shape.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(Show)] +#[derive(Debug)] enum color { red = 0xff0000, green = 0x00ff00, diff --git a/src/test/run-pass/task-comm-16.rs b/src/test/run-pass/task-comm-16.rs index 065777bd961..1d297c04c82 100644 --- a/src/test/run-pass/task-comm-16.rs +++ b/src/test/run-pass/task-comm-16.rs @@ -46,7 +46,7 @@ fn test_str() { assert_eq!(s1.as_bytes()[3], 't' as u8); } -#[derive(Show)] +#[derive(Debug)] enum t { tag1, tag2(int), diff --git a/src/test/run-pass/trait-inheritance-overloading-simple.rs b/src/test/run-pass/trait-inheritance-overloading-simple.rs index 3c319a8c512..4cd9fbeba9c 100644 --- a/src/test/run-pass/trait-inheritance-overloading-simple.rs +++ b/src/test/run-pass/trait-inheritance-overloading-simple.rs @@ -12,7 +12,7 @@ use std::cmp::PartialEq; trait MyNum : PartialEq { } -#[derive(Show)] +#[derive(Debug)] struct MyInt { val: int } impl PartialEq for MyInt { diff --git a/src/test/run-pass/trait-inheritance-overloading.rs b/src/test/run-pass/trait-inheritance-overloading.rs index 43494458518..893f782cba4 100644 --- a/src/test/run-pass/trait-inheritance-overloading.rs +++ b/src/test/run-pass/trait-inheritance-overloading.rs @@ -13,7 +13,7 @@ use std::ops::{Add, Sub, Mul}; trait MyNum : Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + PartialEq + Clone { } -#[derive(Clone, Show)] +#[derive(Clone, Debug)] struct MyInt { val: int } impl Add for MyInt { diff --git a/src/test/run-pass/tuple-struct-construct.rs b/src/test/run-pass/tuple-struct-construct.rs index d7a78dbc411..7773bf647f9 100644 --- a/src/test/run-pass/tuple-struct-construct.rs +++ b/src/test/run-pass/tuple-struct-construct.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(Show)] +#[derive(Debug)] struct Foo(int, int); pub fn main() { diff --git a/src/test/run-pass/tuple-struct-constructor-pointer.rs b/src/test/run-pass/tuple-struct-constructor-pointer.rs index a4bb914b1ab..bcd62e92b46 100644 --- a/src/test/run-pass/tuple-struct-constructor-pointer.rs +++ b/src/test/run-pass/tuple-struct-constructor-pointer.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] struct Foo(int); -#[derive(PartialEq, Show)] +#[derive(PartialEq, Debug)] struct Bar(int, int); pub fn main() { diff --git a/src/test/run-pass/unboxed-closures-monomorphization.rs b/src/test/run-pass/unboxed-closures-monomorphization.rs index 6d192daca2f..29064f48053 100644 --- a/src/test/run-pass/unboxed-closures-monomorphization.rs +++ b/src/test/run-pass/unboxed-closures-monomorphization.rs @@ -30,7 +30,7 @@ fn main(){ let mut f = bar(&x); assert_eq!(f.call_mut(()), &x); - #[derive(Clone, Copy, Show, PartialEq)] + #[derive(Clone, Copy, Debug, PartialEq)] struct Foo(uint, &'static str); let x = Foo(42, "forty-two"); |
