s/Show/Debug/g
This commit is contained in:
parent
09ba9f5c87
commit
788181d405
@ -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"
|
||||
|
@ -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> {
|
||||
|
@ -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,
|
||||
|
@ -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> }
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
//! Creating a recursive data structure:
|
||||
//!
|
||||
//! ```
|
||||
//! #[derive(Show)]
|
||||
//! #[derive(Debug)]
|
||||
//! enum List<T> {
|
||||
//! Cons(T, Box<List<T>>),
|
||||
//! Nil,
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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 {
|
||||
|
@ -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) {
|
||||
|
@ -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,
|
||||
|
@ -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].
|
||||
|
@ -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.
|
||||
|
@ -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> {
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -35,7 +35,7 @@
|
||||
//! ```rust
|
||||
//! use std::ops::{Add, Sub};
|
||||
//!
|
||||
//! #[derive(Show)]
|
||||
//! #[derive(Debug)]
|
||||
//! struct Point {
|
||||
//! x: int,
|
||||
//! y: int
|
||||
|
@ -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
|
||||
|
@ -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> {
|
||||
|
@ -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);
|
||||
|
@ -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 {
|
||||
|
@ -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";
|
||||
|
@ -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_,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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.
|
||||
|
@ -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 {
|
||||
|
@ -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),
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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),
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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),
|
||||
|
@ -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
|
||||
|
@ -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 };
|
||||
|
@ -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),
|
||||
|
@ -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),
|
||||
|
@ -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)]
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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),
|
||||
|
@ -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),
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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,
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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)]
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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!")
|
||||
/// }
|
||||
|
@ -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>>>)
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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>),
|
||||
|
@ -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,
|
||||
|
@ -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.
|
||||
|
@ -63,7 +63,7 @@ macro_rules! svec {
|
||||
})
|
||||
}
|
||||
|
||||
#[derive(Copy,Show)]
|
||||
#[derive(Copy,Debug)]
|
||||
pub enum Row {
|
||||
Variable,
|
||||
Enum,
|
||||
|
@ -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>),
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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),
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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>>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
//
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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),
|
||||
|
@ -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>,
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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),
|
||||
|
@ -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,
|
||||
}
|
||||
|
@ -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
|
||||
///
|
||||
|
@ -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),
|
||||
|
@ -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
|
||||
|
@ -105,7 +105,7 @@ struct Buffer<T> {
|
||||
size: uint,
|
||||
}
|
||||
|
||||
#[derive(Show)]
|
||||
#[derive(Debug)]
|
||||
pub enum Failure {
|
||||
Empty,
|
||||
Disconnected,
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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>,
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user