s/Show/Debug/g
This commit is contained in:
parent
09ba9f5c87
commit
788181d405
195 changed files with 577 additions and 577 deletions
|
@ -17,7 +17,7 @@ pub struct ExpectedError {
|
||||||
pub msg: String,
|
pub msg: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Show)]
|
#[derive(PartialEq, Debug)]
|
||||||
enum WhichLine { ThisLine, FollowPrevious(uint), AdjustBackward(uint) }
|
enum WhichLine { ThisLine, FollowPrevious(uint), AdjustBackward(uint) }
|
||||||
|
|
||||||
/// Looks for either "//~| KIND MESSAGE" or "//~^^... KIND MESSAGE"
|
/// 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`:
|
Here's an example of using `Result`:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
enum Version { Version1, Version2 }
|
enum Version { Version1, Version2 }
|
||||||
|
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
enum ParseError { InvalidHeaderLength, InvalidVersion }
|
enum ParseError { InvalidHeaderLength, InvalidVersion }
|
||||||
|
|
||||||
fn parse_version(header: &[u8]) -> Result<Version, ParseError> {
|
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}
|
```{rust}
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
enum List<T> {
|
enum List<T> {
|
||||||
Cons(T, Box<List<T>>),
|
Cons(T, Box<List<T>>),
|
||||||
Nil,
|
Nil,
|
||||||
|
|
|
@ -814,6 +814,6 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure deriving works with Arc<T>
|
// 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> }
|
struct Foo { inner: Arc<int> }
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
//! Creating a recursive data structure:
|
//! Creating a recursive data structure:
|
||||||
//!
|
//!
|
||||||
//! ```
|
//! ```
|
||||||
//! #[derive(Show)]
|
//! #[derive(Debug)]
|
||||||
//! enum List<T> {
|
//! enum List<T> {
|
||||||
//! Cons(T, Box<List<T>>),
|
//! Cons(T, Box<List<T>>),
|
||||||
//! Nil,
|
//! Nil,
|
||||||
|
|
|
@ -272,7 +272,7 @@ mod test {
|
||||||
|
|
||||||
use super::{EnumSet, CLike};
|
use super::{EnumSet, CLike};
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
#[repr(uint)]
|
#[repr(uint)]
|
||||||
enum Foo {
|
enum Foo {
|
||||||
A, B, C
|
A, B, C
|
||||||
|
|
|
@ -1852,21 +1852,21 @@ mod tests {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Show)]
|
#[derive(Clone, PartialEq, Debug)]
|
||||||
enum Taggy {
|
enum Taggy {
|
||||||
One(int),
|
One(int),
|
||||||
Two(int, int),
|
Two(int, int),
|
||||||
Three(int, int, int),
|
Three(int, int, int),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Show)]
|
#[derive(Clone, PartialEq, Debug)]
|
||||||
enum Taggypar<T> {
|
enum Taggypar<T> {
|
||||||
Onepar(int),
|
Onepar(int),
|
||||||
Twopar(int, int),
|
Twopar(int, int),
|
||||||
Threepar(int, int, int),
|
Threepar(int, int, int),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Show)]
|
#[derive(Clone, PartialEq, Debug)]
|
||||||
struct RecCy {
|
struct RecCy {
|
||||||
x: int,
|
x: int,
|
||||||
y: int,
|
y: int,
|
||||||
|
|
|
@ -41,7 +41,7 @@ pub struct String {
|
||||||
|
|
||||||
/// A possible error value from the `String::from_utf8` function.
|
/// A possible error value from the `String::from_utf8` function.
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
pub struct FromUtf8Error {
|
pub struct FromUtf8Error {
|
||||||
bytes: Vec<u8>,
|
bytes: Vec<u8>,
|
||||||
error: Utf8Error,
|
error: Utf8Error,
|
||||||
|
@ -50,7 +50,7 @@ pub struct FromUtf8Error {
|
||||||
/// A possible error value from the `String::from_utf16` function.
|
/// A possible error value from the `String::from_utf16` function.
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[allow(missing_copy_implementations)]
|
#[allow(missing_copy_implementations)]
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
pub struct FromUtf16Error(());
|
pub struct FromUtf16Error(());
|
||||||
|
|
||||||
impl String {
|
impl String {
|
||||||
|
|
|
@ -811,7 +811,7 @@ impl<T> Vec<T> {
|
||||||
/// let w = v.map_in_place(|i| i + 3);
|
/// let w = v.map_in_place(|i| i + 3);
|
||||||
/// assert_eq!(w.as_slice(), [3, 4, 5].as_slice());
|
/// assert_eq!(w.as_slice(), [3, 4, 5].as_slice());
|
||||||
///
|
///
|
||||||
/// #[derive(PartialEq, Show)]
|
/// #[derive(PartialEq, Debug)]
|
||||||
/// struct Newtype(u8);
|
/// struct Newtype(u8);
|
||||||
/// let bytes = vec![0x11, 0x22];
|
/// let bytes = vec![0x11, 0x22];
|
||||||
/// let newtyped_bytes = bytes.map_in_place(|x| Newtype(x));
|
/// let newtyped_bytes = bytes.map_in_place(|x| Newtype(x));
|
||||||
|
@ -2279,7 +2279,7 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_map_in_place_zero_sized() {
|
fn test_map_in_place_zero_sized() {
|
||||||
let v = vec![(), ()];
|
let v = vec![(), ()];
|
||||||
#[derive(PartialEq, Show)]
|
#[derive(PartialEq, Debug)]
|
||||||
struct ZeroSized;
|
struct ZeroSized;
|
||||||
assert_eq!(v.map_in_place(|_| ZeroSized), [ZeroSized, ZeroSized]);
|
assert_eq!(v.map_in_place(|_| ZeroSized), [ZeroSized, ZeroSized]);
|
||||||
}
|
}
|
||||||
|
@ -2288,11 +2288,11 @@ mod tests {
|
||||||
fn test_map_in_place_zero_drop_count() {
|
fn test_map_in_place_zero_drop_count() {
|
||||||
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
|
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Show)]
|
#[derive(Clone, PartialEq, Debug)]
|
||||||
struct Nothing;
|
struct Nothing;
|
||||||
impl Drop for Nothing { fn drop(&mut self) { } }
|
impl Drop for Nothing { fn drop(&mut self) { } }
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Show)]
|
#[derive(Clone, PartialEq, Debug)]
|
||||||
struct ZeroSized;
|
struct ZeroSized;
|
||||||
impl Drop for ZeroSized {
|
impl Drop for ZeroSized {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
|
|
|
@ -166,7 +166,7 @@ impl Any {
|
||||||
///
|
///
|
||||||
/// A `TypeId` is currently only available for types which ascribe to `'static`,
|
/// A `TypeId` is currently only available for types which ascribe to `'static`,
|
||||||
/// but this limitation may be removed in the future.
|
/// 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")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub struct TypeId {
|
pub struct TypeId {
|
||||||
t: u64,
|
t: u64,
|
||||||
|
|
|
@ -105,7 +105,7 @@ pub trait Eq: PartialEq<Self> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An ordering is, e.g, a result of a comparison between two values.
|
/// 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")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub enum Ordering {
|
pub enum Ordering {
|
||||||
/// An ordering where a compared value is less [than another].
|
/// An ordering where a compared value is less [than another].
|
||||||
|
|
|
@ -48,7 +48,7 @@ pub type Result = result::Result<(), Error>;
|
||||||
/// some other means.
|
/// some other means.
|
||||||
#[unstable(feature = "core",
|
#[unstable(feature = "core",
|
||||||
reason = "core and I/O reconciliation may alter this definition")]
|
reason = "core and I/O reconciliation may alter this definition")]
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub struct Error;
|
pub struct Error;
|
||||||
|
|
||||||
/// A collection of methods that are required to format a message into a stream.
|
/// 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 }
|
impl_multiplicative! { f64, 1.0 }
|
||||||
|
|
||||||
/// `MinMaxResult` is an enum returned by `min_max`. See `IteratorOrdExt::min_max` for more detail.
|
/// `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",
|
#[unstable(feature = "core",
|
||||||
reason = "unclear whether such a fine-grained result is widely useful")]
|
reason = "unclear whether such a fine-grained result is widely useful")]
|
||||||
pub enum MinMaxResult<T> {
|
pub enum MinMaxResult<T> {
|
||||||
|
|
|
@ -50,7 +50,7 @@ pub trait Sized {
|
||||||
/// words:
|
/// words:
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #[derive(Show)]
|
/// #[derive(Debug)]
|
||||||
/// struct Foo;
|
/// struct Foo;
|
||||||
///
|
///
|
||||||
/// let x = Foo;
|
/// let x = Foo;
|
||||||
|
@ -66,7 +66,7 @@ pub trait Sized {
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// // we can just derive a `Copy` implementation
|
/// // we can just derive a `Copy` implementation
|
||||||
/// #[derive(Show, Copy)]
|
/// #[derive(Debug, Copy)]
|
||||||
/// struct Foo;
|
/// struct Foo;
|
||||||
///
|
///
|
||||||
/// let x = 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
|
/// A wrapper type for raw pointers and integers that will never be
|
||||||
/// NULL or 0 that might allow certain optimizations.
|
/// NULL or 0 that might allow certain optimizations.
|
||||||
#[lang="non_zero"]
|
#[lang="non_zero"]
|
||||||
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Show, Hash)]
|
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Hash)]
|
||||||
#[unstable(feature = "core")]
|
#[unstable(feature = "core")]
|
||||||
pub struct NonZero<T: Zeroable>(T);
|
pub struct NonZero<T: Zeroable>(T);
|
||||||
|
|
||||||
|
|
|
@ -1241,7 +1241,7 @@ impl_num_cast! { f32, to_f32 }
|
||||||
impl_num_cast! { f64, to_f64 }
|
impl_num_cast! { f64, to_f64 }
|
||||||
|
|
||||||
/// Used for representing the classification of floating point numbers
|
/// Used for representing the classification of floating point numbers
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
#[unstable(feature = "core", reason = "may be renamed")]
|
#[unstable(feature = "core", reason = "may be renamed")]
|
||||||
pub enum FpCategory {
|
pub enum FpCategory {
|
||||||
/// "Not a Number", often obtained by dividing by zero
|
/// "Not a Number", often obtained by dividing by zero
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use std::ops::{Add, Sub};
|
//! use std::ops::{Add, Sub};
|
||||||
//!
|
//!
|
||||||
//! #[derive(Show)]
|
//! #[derive(Debug)]
|
||||||
//! struct Point {
|
//! struct Point {
|
||||||
//! x: int,
|
//! x: int,
|
||||||
//! y: int
|
//! y: int
|
||||||
|
|
|
@ -163,7 +163,7 @@ use slice;
|
||||||
// which basically means it must be `Option`.
|
// which basically means it must be `Option`.
|
||||||
|
|
||||||
/// The `Option` type.
|
/// 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")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub enum Option<T> {
|
pub enum Option<T> {
|
||||||
/// No value
|
/// No value
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
//! defined and used like so:
|
//! defined and used like so:
|
||||||
//!
|
//!
|
||||||
//! ```
|
//! ```
|
||||||
//! #[derive(Show)]
|
//! #[derive(Debug)]
|
||||||
//! enum Version { Version1, Version2 }
|
//! enum Version { Version1, Version2 }
|
||||||
//!
|
//!
|
||||||
//! fn parse_version(header: &[u8]) -> Result<Version, &'static str> {
|
//! 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`).
|
/// `Result` is a type that represents either success (`Ok`) or failure (`Err`).
|
||||||
///
|
///
|
||||||
/// See the [`std::result`](index.html) module documentation for details.
|
/// 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]
|
#[must_use]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub enum Result<T, E> {
|
pub enum Result<T, E> {
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
#[unstable(feature = "core")]
|
#[unstable(feature = "core")]
|
||||||
#[simd]
|
#[simd]
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct i8x16(pub i8, pub i8, pub i8, pub i8,
|
pub struct i8x16(pub i8, pub i8, pub i8, pub i8,
|
||||||
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")]
|
#[unstable(feature = "core")]
|
||||||
#[simd]
|
#[simd]
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct i16x8(pub i16, pub i16, pub i16, pub i16,
|
pub struct i16x8(pub i16, pub i16, pub i16, pub i16,
|
||||||
pub i16, pub i16, pub i16, pub i16);
|
pub i16, pub i16, pub i16, pub i16);
|
||||||
|
|
||||||
#[unstable(feature = "core")]
|
#[unstable(feature = "core")]
|
||||||
#[simd]
|
#[simd]
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct i32x4(pub i32, pub i32, pub i32, pub i32);
|
pub struct i32x4(pub i32, pub i32, pub i32, pub i32);
|
||||||
|
|
||||||
#[unstable(feature = "core")]
|
#[unstable(feature = "core")]
|
||||||
#[simd]
|
#[simd]
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct i64x2(pub i64, pub i64);
|
pub struct i64x2(pub i64, pub i64);
|
||||||
|
|
||||||
#[unstable(feature = "core")]
|
#[unstable(feature = "core")]
|
||||||
#[simd]
|
#[simd]
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct u8x16(pub u8, pub u8, pub u8, pub u8,
|
pub struct u8x16(pub u8, pub u8, pub u8, pub u8,
|
||||||
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")]
|
#[unstable(feature = "core")]
|
||||||
#[simd]
|
#[simd]
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct u16x8(pub u16, pub u16, pub u16, pub u16,
|
pub struct u16x8(pub u16, pub u16, pub u16, pub u16,
|
||||||
pub u16, pub u16, pub u16, pub u16);
|
pub u16, pub u16, pub u16, pub u16);
|
||||||
|
|
||||||
#[unstable(feature = "core")]
|
#[unstable(feature = "core")]
|
||||||
#[simd]
|
#[simd]
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct u32x4(pub u32, pub u32, pub u32, pub u32);
|
pub struct u32x4(pub u32, pub u32, pub u32, pub u32);
|
||||||
|
|
||||||
#[unstable(feature = "core")]
|
#[unstable(feature = "core")]
|
||||||
#[simd]
|
#[simd]
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct u64x2(pub u64, pub u64);
|
pub struct u64x2(pub u64, pub u64);
|
||||||
|
|
||||||
#[unstable(feature = "core")]
|
#[unstable(feature = "core")]
|
||||||
#[simd]
|
#[simd]
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct f32x4(pub f32, pub f32, pub f32, pub f32);
|
pub struct f32x4(pub f32, pub f32, pub f32, pub f32);
|
||||||
|
|
||||||
#[unstable(feature = "core")]
|
#[unstable(feature = "core")]
|
||||||
#[simd]
|
#[simd]
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct f64x2(pub f64, pub f64);
|
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`.
|
/// 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",
|
#[unstable(feature = "core",
|
||||||
reason = "error enumeration recently added and definitions may be refined")]
|
reason = "error enumeration recently added and definitions may be refined")]
|
||||||
pub enum Utf8Error {
|
pub enum Utf8Error {
|
||||||
|
|
|
@ -11,7 +11,7 @@ use core::any::*;
|
||||||
use test::Bencher;
|
use test::Bencher;
|
||||||
use test;
|
use test;
|
||||||
|
|
||||||
#[derive(PartialEq, Show)]
|
#[derive(PartialEq, Debug)]
|
||||||
struct Test;
|
struct Test;
|
||||||
|
|
||||||
static TEST: &'static str = "Test";
|
static TEST: &'static str = "Test";
|
||||||
|
|
|
@ -111,7 +111,7 @@ use std::iter::repeat;
|
||||||
use std::result;
|
use std::result;
|
||||||
|
|
||||||
/// Name of an option. Either a string or a single char.
|
/// Name of an option. Either a string or a single char.
|
||||||
#[derive(Clone, PartialEq, Eq, Show)]
|
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||||
pub enum Name {
|
pub enum Name {
|
||||||
/// A string representing the long name of an option.
|
/// A string representing the long name of an option.
|
||||||
/// For example: "help"
|
/// For example: "help"
|
||||||
|
@ -122,7 +122,7 @@ pub enum Name {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Describes whether an option has an argument.
|
/// Describes whether an option has an argument.
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Show)]
|
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
|
||||||
pub enum HasArg {
|
pub enum HasArg {
|
||||||
/// The option requires an argument.
|
/// The option requires an argument.
|
||||||
Yes,
|
Yes,
|
||||||
|
@ -133,7 +133,7 @@ pub enum HasArg {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Describes how often an option may occur.
|
/// Describes how often an option may occur.
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Show)]
|
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
|
||||||
pub enum Occur {
|
pub enum Occur {
|
||||||
/// The option occurs once.
|
/// The option occurs once.
|
||||||
Req,
|
Req,
|
||||||
|
@ -144,7 +144,7 @@ pub enum Occur {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A description of a possible option.
|
/// A description of a possible option.
|
||||||
#[derive(Clone, PartialEq, Eq, Show)]
|
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||||
pub struct Opt {
|
pub struct Opt {
|
||||||
/// Name of the option
|
/// Name of the option
|
||||||
pub name: Name,
|
pub name: Name,
|
||||||
|
@ -158,7 +158,7 @@ pub struct Opt {
|
||||||
|
|
||||||
/// One group of options, e.g., both `-h` and `--help`, along with
|
/// One group of options, e.g., both `-h` and `--help`, along with
|
||||||
/// their shared description and properties.
|
/// their shared description and properties.
|
||||||
#[derive(Clone, PartialEq, Eq, Show)]
|
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||||
pub struct OptGroup {
|
pub struct OptGroup {
|
||||||
/// Short name of the option, e.g. `h` for a `-h` option
|
/// Short name of the option, e.g. `h` for a `-h` option
|
||||||
pub short_name: String,
|
pub short_name: String,
|
||||||
|
@ -175,7 +175,7 @@ pub struct OptGroup {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Describes whether an option is given at all or has a value.
|
/// Describes whether an option is given at all or has a value.
|
||||||
#[derive(Clone, PartialEq, Eq, Show)]
|
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||||
enum Optval {
|
enum Optval {
|
||||||
Val(String),
|
Val(String),
|
||||||
Given,
|
Given,
|
||||||
|
@ -183,7 +183,7 @@ enum Optval {
|
||||||
|
|
||||||
/// The result of checking command line arguments. Contains a vector
|
/// The result of checking command line arguments. Contains a vector
|
||||||
/// of matches and a vector of free strings.
|
/// of matches and a vector of free strings.
|
||||||
#[derive(Clone, PartialEq, Eq, Show)]
|
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||||
pub struct Matches {
|
pub struct Matches {
|
||||||
/// Options that matched
|
/// Options that matched
|
||||||
opts: Vec<Opt>,
|
opts: Vec<Opt>,
|
||||||
|
@ -196,7 +196,7 @@ pub struct Matches {
|
||||||
/// The type returned when the command line does not conform to the
|
/// The type returned when the command line does not conform to the
|
||||||
/// expected format. Use the `Show` implementation to output detailed
|
/// expected format. Use the `Show` implementation to output detailed
|
||||||
/// information.
|
/// information.
|
||||||
#[derive(Clone, PartialEq, Eq, Show)]
|
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||||
pub enum Fail {
|
pub enum Fail {
|
||||||
/// The option requires an argument but none was passed.
|
/// The option requires an argument but none was passed.
|
||||||
ArgumentMissing(String),
|
ArgumentMissing(String),
|
||||||
|
@ -211,7 +211,7 @@ pub enum Fail {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The type of failure that occurred.
|
/// The type of failure that occurred.
|
||||||
#[derive(Copy, PartialEq, Eq, Show)]
|
#[derive(Copy, PartialEq, Eq, Debug)]
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
pub enum FailType {
|
pub enum FailType {
|
||||||
ArgumentMissing_,
|
ArgumentMissing_,
|
||||||
|
|
|
@ -523,7 +523,7 @@ pub trait GraphWalk<'a, N, E> {
|
||||||
fn target(&'a self, edge: &E) -> N;
|
fn target(&'a self, edge: &E) -> N;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Eq, Show)]
|
#[derive(Copy, PartialEq, Eq, Debug)]
|
||||||
pub enum RenderOption {
|
pub enum RenderOption {
|
||||||
NoEdgeLabels,
|
NoEdgeLabels,
|
||||||
NoNodeLabels,
|
NoNodeLabels,
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
use std::ascii::AsciiExt;
|
use std::ascii::AsciiExt;
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
|
|
||||||
#[derive(Show, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct LogDirective {
|
pub struct LogDirective {
|
||||||
pub name: Option<String>,
|
pub name: Option<String>,
|
||||||
pub level: u32,
|
pub level: u32,
|
||||||
|
|
|
@ -243,7 +243,7 @@ struct DefaultLogger {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Wraps the log level with fmt implementations.
|
/// Wraps the log level with fmt implementations.
|
||||||
#[derive(Copy, PartialEq, PartialOrd, Show)]
|
#[derive(Copy, PartialEq, PartialOrd, Debug)]
|
||||||
pub struct LogLevel(pub u32);
|
pub struct LogLevel(pub u32);
|
||||||
|
|
||||||
impl fmt::Display for LogLevel {
|
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
|
/// A LogRecord is created by the logging macros, and passed as the only
|
||||||
/// argument to Loggers.
|
/// argument to Loggers.
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
pub struct LogRecord<'a> {
|
pub struct LogRecord<'a> {
|
||||||
|
|
||||||
/// The module path of where the LogRecord originated.
|
/// The module path of where the LogRecord originated.
|
||||||
|
|
|
@ -263,7 +263,7 @@ mod tests {
|
||||||
use {Rng, Rand};
|
use {Rng, Rand};
|
||||||
use super::{RandSample, WeightedChoice, Weighted, Sample, IndependentSample};
|
use super::{RandSample, WeightedChoice, Weighted, Sample, IndependentSample};
|
||||||
|
|
||||||
#[derive(PartialEq, Show)]
|
#[derive(PartialEq, Debug)]
|
||||||
struct ConstRand(uint);
|
struct ConstRand(uint);
|
||||||
impl Rand for ConstRand {
|
impl Rand for ConstRand {
|
||||||
fn rand<R: Rng>(_: &mut R) -> ConstRand {
|
fn rand<R: Rng>(_: &mut R) -> ConstRand {
|
||||||
|
|
|
@ -77,7 +77,7 @@ pub struct TaggedDoc<'a> {
|
||||||
pub doc: Doc<'a>,
|
pub doc: Doc<'a>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub enum EbmlEncoderTag {
|
pub enum EbmlEncoderTag {
|
||||||
EsUint, // 0
|
EsUint, // 0
|
||||||
EsU64, // 1
|
EsU64, // 1
|
||||||
|
@ -111,7 +111,7 @@ pub enum EbmlEncoderTag {
|
||||||
EsLabel, // Used only when debugging
|
EsLabel, // Used only when debugging
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
IntTooBig(uint),
|
IntTooBig(uint),
|
||||||
Expected(String),
|
Expected(String),
|
||||||
|
|
|
@ -40,7 +40,7 @@ use syntax::ast;
|
||||||
pub use lint::context::{Context, LintStore, raw_emit_lint, check_crate, gather_attrs};
|
pub use lint::context::{Context, LintStore, raw_emit_lint, check_crate, gather_attrs};
|
||||||
|
|
||||||
/// Specification of a single lint.
|
/// Specification of a single lint.
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub struct Lint {
|
pub struct Lint {
|
||||||
/// A string identifier for the lint.
|
/// A string identifier for the lint.
|
||||||
///
|
///
|
||||||
|
@ -207,7 +207,7 @@ impl LintId {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Setting for how to handle a lint.
|
/// 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 {
|
pub enum Level {
|
||||||
Allow, Warn, Deny, Forbid
|
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;
|
pub const tag_items_data_item_repr: uint = 0x93;
|
||||||
|
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct LinkMeta {
|
pub struct LinkMeta {
|
||||||
pub crate_name: String,
|
pub crate_name: String,
|
||||||
pub crate_hash: Svh,
|
pub crate_hash: Svh,
|
||||||
|
|
|
@ -49,7 +49,7 @@ pub struct crate_metadata {
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Show, PartialEq, Clone)]
|
#[derive(Copy, Debug, PartialEq, Clone)]
|
||||||
pub enum LinkagePreference {
|
pub enum LinkagePreference {
|
||||||
RequireDynamic,
|
RequireDynamic,
|
||||||
RequireStatic,
|
RequireStatic,
|
||||||
|
|
|
@ -493,7 +493,7 @@ pub fn get_symbol(data: &[u8], id: ast::NodeId) -> String {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Something that a name can resolve to.
|
// Something that a name can resolve to.
|
||||||
#[derive(Copy, Clone, Show)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
pub enum DefLike {
|
pub enum DefLike {
|
||||||
DlDef(def::Def),
|
DlDef(def::Def),
|
||||||
DlImpl(ast::DefId),
|
DlImpl(ast::DefId),
|
||||||
|
|
|
@ -43,7 +43,7 @@ use syntax::parse::token;
|
||||||
// def-id will depend on where it originated from. Therefore, the conversion
|
// 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
|
// function is given an indicator of the source of the def-id. See
|
||||||
// astencode.rs for more information.
|
// astencode.rs for more information.
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub enum DefIdSource {
|
pub enum DefIdSource {
|
||||||
// Identifies a struct, trait, enum, etc.
|
// Identifies a struct, trait, enum, etc.
|
||||||
NominalType,
|
NominalType,
|
||||||
|
|
|
@ -28,7 +28,7 @@ use syntax::visit;
|
||||||
use syntax::print::{pp, pprust};
|
use syntax::print::{pp, pprust};
|
||||||
use util::nodemap::NodeMap;
|
use util::nodemap::NodeMap;
|
||||||
|
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub enum EntryOrExit {
|
pub enum EntryOrExit {
|
||||||
Entry,
|
Entry,
|
||||||
Exit,
|
Exit,
|
||||||
|
|
|
@ -20,7 +20,7 @@ use syntax::ast_util::local_def;
|
||||||
|
|
||||||
use std::cell::RefCell;
|
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 {
|
pub enum Def {
|
||||||
DefFn(ast::DefId, bool /* is_ctor */),
|
DefFn(ast::DefId, bool /* is_ctor */),
|
||||||
DefStaticMethod(/* method */ ast::DefId, MethodProvenance),
|
DefStaticMethod(/* method */ ast::DefId, MethodProvenance),
|
||||||
|
@ -72,13 +72,13 @@ pub struct Export {
|
||||||
pub def_id: ast::DefId, // The definition of the target.
|
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 {
|
pub enum MethodProvenance {
|
||||||
FromTrait(ast::DefId),
|
FromTrait(ast::DefId),
|
||||||
FromImpl(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 {
|
pub enum TyParamProvenance {
|
||||||
FromSelf(ast::DefId),
|
FromSelf(ast::DefId),
|
||||||
FromParam(ast::DefId),
|
FromParam(ast::DefId),
|
||||||
|
|
|
@ -95,7 +95,7 @@ pub trait Delegate<'tcx> {
|
||||||
mode: MutateMode);
|
mode: MutateMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
pub enum LoanCause {
|
pub enum LoanCause {
|
||||||
ClosureCapture(Span),
|
ClosureCapture(Span),
|
||||||
AddrOf,
|
AddrOf,
|
||||||
|
@ -107,20 +107,20 @@ pub enum LoanCause {
|
||||||
MatchDiscriminant
|
MatchDiscriminant
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
pub enum ConsumeMode {
|
pub enum ConsumeMode {
|
||||||
Copy, // reference to x where x has a type that copies
|
Copy, // reference to x where x has a type that copies
|
||||||
Move(MoveReason), // reference to x where x has a type that moves
|
Move(MoveReason), // reference to x where x has a type that moves
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
pub enum MoveReason {
|
pub enum MoveReason {
|
||||||
DirectRefMove,
|
DirectRefMove,
|
||||||
PatBindingMove,
|
PatBindingMove,
|
||||||
CaptureMove,
|
CaptureMove,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
pub enum MatchMode {
|
pub enum MatchMode {
|
||||||
NonBindingMatch,
|
NonBindingMatch,
|
||||||
BorrowingMatch,
|
BorrowingMatch,
|
||||||
|
@ -128,7 +128,7 @@ pub enum MatchMode {
|
||||||
MovingMatch,
|
MovingMatch,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq,Show)]
|
#[derive(PartialEq,Debug)]
|
||||||
enum TrackMatchMode<T> {
|
enum TrackMatchMode<T> {
|
||||||
Unknown,
|
Unknown,
|
||||||
Definite(MatchMode),
|
Definite(MatchMode),
|
||||||
|
@ -197,7 +197,7 @@ impl<T> TrackMatchMode<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
pub enum MutateMode {
|
pub enum MutateMode {
|
||||||
Init,
|
Init,
|
||||||
JustWrite, // x = y
|
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);
|
pub struct NodeIndex(pub uint);
|
||||||
#[allow(non_upper_case_globals)]
|
#[allow(non_upper_case_globals)]
|
||||||
pub const InvalidNodeIndex: NodeIndex = NodeIndex(uint::MAX);
|
pub const InvalidNodeIndex: NodeIndex = NodeIndex(uint::MAX);
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
pub struct EdgeIndex(pub uint);
|
pub struct EdgeIndex(pub uint);
|
||||||
#[allow(non_upper_case_globals)]
|
#[allow(non_upper_case_globals)]
|
||||||
pub const InvalidEdgeIndex: EdgeIndex = EdgeIndex(uint::MAX);
|
pub const InvalidEdgeIndex: EdgeIndex = EdgeIndex(uint::MAX);
|
||||||
|
|
||||||
// Use a private field here to guarantee no more instances are created:
|
// Use a private field here to guarantee no more instances are created:
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub struct Direction { repr: uint }
|
pub struct Direction { repr: uint }
|
||||||
#[allow(non_upper_case_globals)]
|
#[allow(non_upper_case_globals)]
|
||||||
pub const Outgoing: Direction = Direction { repr: 0 };
|
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?
|
/// Why did we require that the two types be related?
|
||||||
///
|
///
|
||||||
/// See `error_reporting.rs` for more details
|
/// See `error_reporting.rs` for more details
|
||||||
#[derive(Clone, Copy, Show)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
pub enum TypeOrigin {
|
pub enum TypeOrigin {
|
||||||
// Not yet categorized in a better way
|
// Not yet categorized in a better way
|
||||||
Misc(Span),
|
Misc(Span),
|
||||||
|
@ -133,7 +133,7 @@ pub enum TypeOrigin {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// See `error_reporting.rs` for more details
|
/// See `error_reporting.rs` for more details
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum ValuePairs<'tcx> {
|
pub enum ValuePairs<'tcx> {
|
||||||
Types(ty::expected_found<Ty<'tcx>>),
|
Types(ty::expected_found<Ty<'tcx>>),
|
||||||
TraitRefs(ty::expected_found<Rc<ty::TraitRef<'tcx>>>),
|
TraitRefs(ty::expected_found<Rc<ty::TraitRef<'tcx>>>),
|
||||||
|
@ -144,7 +144,7 @@ pub enum ValuePairs<'tcx> {
|
||||||
/// encounter an error or subtyping constraint.
|
/// encounter an error or subtyping constraint.
|
||||||
///
|
///
|
||||||
/// See `error_reporting.rs` for more details.
|
/// See `error_reporting.rs` for more details.
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct TypeTrace<'tcx> {
|
pub struct TypeTrace<'tcx> {
|
||||||
origin: TypeOrigin,
|
origin: TypeOrigin,
|
||||||
values: ValuePairs<'tcx>,
|
values: ValuePairs<'tcx>,
|
||||||
|
@ -153,7 +153,7 @@ pub struct TypeTrace<'tcx> {
|
||||||
/// The origin of a `r1 <= r2` constraint.
|
/// The origin of a `r1 <= r2` constraint.
|
||||||
///
|
///
|
||||||
/// See `error_reporting.rs` for more details
|
/// See `error_reporting.rs` for more details
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum SubregionOrigin<'tcx> {
|
pub enum SubregionOrigin<'tcx> {
|
||||||
// Arose from a subtyping relation
|
// Arose from a subtyping relation
|
||||||
Subtype(TypeTrace<'tcx>),
|
Subtype(TypeTrace<'tcx>),
|
||||||
|
@ -222,7 +222,7 @@ pub enum SubregionOrigin<'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Times when we replace late-bound regions with variables:
|
/// Times when we replace late-bound regions with variables:
|
||||||
#[derive(Clone, Copy, Show)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
pub enum LateBoundRegionConversionTime {
|
pub enum LateBoundRegionConversionTime {
|
||||||
/// when a fn is called
|
/// when a fn is called
|
||||||
FnCall,
|
FnCall,
|
||||||
|
@ -237,7 +237,7 @@ pub enum LateBoundRegionConversionTime {
|
||||||
/// Reasons to create a region inference variable
|
/// Reasons to create a region inference variable
|
||||||
///
|
///
|
||||||
/// See `error_reporting.rs` for more details
|
/// See `error_reporting.rs` for more details
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum RegionVariableOrigin<'tcx> {
|
pub enum RegionVariableOrigin<'tcx> {
|
||||||
// Region variables created for ill-categorized reasons,
|
// Region variables created for ill-categorized reasons,
|
||||||
// mostly indicates places in need of refactoring
|
// mostly indicates places in need of refactoring
|
||||||
|
@ -270,7 +270,7 @@ pub enum RegionVariableOrigin<'tcx> {
|
||||||
BoundRegionInCoherence(ast::Name),
|
BoundRegionInCoherence(ast::Name),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub enum fixup_err {
|
pub enum fixup_err {
|
||||||
unresolved_int_ty(IntVid),
|
unresolved_int_ty(IntVid),
|
||||||
unresolved_float_ty(FloatVid),
|
unresolved_float_ty(FloatVid),
|
||||||
|
|
|
@ -120,7 +120,7 @@ struct ConstraintGraph<'a, 'tcx: 'a> {
|
||||||
node_ids: FnvHashMap<Node, uint>,
|
node_ids: FnvHashMap<Node, uint>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Hash, PartialEq, Eq, Show)]
|
#[derive(Clone, Hash, PartialEq, Eq, Debug)]
|
||||||
enum Node {
|
enum Node {
|
||||||
RegionVid(ty::RegionVid),
|
RegionVid(ty::RegionVid),
|
||||||
Region(ty::Region),
|
Region(ty::Region),
|
||||||
|
|
|
@ -42,7 +42,7 @@ mod doc;
|
||||||
mod graphviz;
|
mod graphviz;
|
||||||
|
|
||||||
// A constraint that influences the inference process.
|
// A constraint that influences the inference process.
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
|
||||||
pub enum Constraint {
|
pub enum Constraint {
|
||||||
// One region variable is subregion of another
|
// One region variable is subregion of another
|
||||||
ConstrainVarSubVar(RegionVid, RegionVid),
|
ConstrainVarSubVar(RegionVid, RegionVid),
|
||||||
|
@ -69,7 +69,7 @@ pub enum Verify<'tcx> {
|
||||||
VerifyGenericBound(GenericKind<'tcx>, SubregionOrigin<'tcx>, Region, Vec<Region>),
|
VerifyGenericBound(GenericKind<'tcx>, SubregionOrigin<'tcx>, Region, Vec<Region>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Show, PartialEq, Eq)]
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||||
pub enum GenericKind<'tcx> {
|
pub enum GenericKind<'tcx> {
|
||||||
Param(ty::ParamTy),
|
Param(ty::ParamTy),
|
||||||
Projection(ty::ProjectionTy<'tcx>),
|
Projection(ty::ProjectionTy<'tcx>),
|
||||||
|
@ -97,7 +97,7 @@ pub enum CombineMapType {
|
||||||
Lub, Glb
|
Lub, Glb
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum RegionResolutionError<'tcx> {
|
pub enum RegionResolutionError<'tcx> {
|
||||||
/// `ConcreteFailure(o, a, b)`:
|
/// `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
|
/// would report an error because we expect 'a and 'b to match, and so we group
|
||||||
/// 'a and 'b together inside a SameRegions struct
|
/// 'a and 'b together inside a SameRegions struct
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct SameRegions {
|
pub struct SameRegions {
|
||||||
pub scope_id: ast::NodeId,
|
pub scope_id: ast::NodeId,
|
||||||
pub regions: Vec<BoundRegion>
|
pub regions: Vec<BoundRegion>
|
||||||
|
@ -223,7 +223,7 @@ pub struct RegionVarBindings<'a, 'tcx: 'a> {
|
||||||
values: RefCell<Option<Vec<VarValue>>>,
|
values: RefCell<Option<Vec<VarValue>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
#[allow(missing_copy_implementations)]
|
#[allow(missing_copy_implementations)]
|
||||||
pub struct RegionSnapshot {
|
pub struct RegionSnapshot {
|
||||||
length: uint,
|
length: uint,
|
||||||
|
@ -943,7 +943,7 @@ impl<'a, 'tcx> RegionVarBindings<'a, 'tcx> {
|
||||||
|
|
||||||
// ______________________________________________________________________
|
// ______________________________________________________________________
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
enum Classification { Expanding, Contracting }
|
enum Classification { Expanding, Contracting }
|
||||||
|
|
||||||
#[derive(Copy)]
|
#[derive(Copy)]
|
||||||
|
|
|
@ -46,7 +46,7 @@ struct Delegate<'tcx>;
|
||||||
|
|
||||||
type Relation = (RelationDir, ty::TyVid);
|
type Relation = (RelationDir, ty::TyVid);
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
pub enum RelationDir {
|
pub enum RelationDir {
|
||||||
SubtypeOf, SupertypeOf, EqTo
|
SubtypeOf, SupertypeOf, EqTo
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ pub trait UnifyValue : Clone + PartialEq + Debug {
|
||||||
/// to keep the DAG relatively balanced, which helps keep the running
|
/// to keep the DAG relatively balanced, which helps keep the running
|
||||||
/// time of the algorithm under control. For more information, see
|
/// time of the algorithm under control. For more information, see
|
||||||
/// <http://en.wikipedia.org/wiki/Disjoint-set_data_structure>.
|
/// <http://en.wikipedia.org/wiki/Disjoint-set_data_structure>.
|
||||||
#[derive(PartialEq,Clone,Show)]
|
#[derive(PartialEq,Clone,Debug)]
|
||||||
pub enum VarValue<K:UnifyKey> {
|
pub enum VarValue<K:UnifyKey> {
|
||||||
Redirect(K),
|
Redirect(K),
|
||||||
Root(K::Value, uint),
|
Root(K::Value, uint),
|
||||||
|
|
|
@ -159,7 +159,7 @@ impl Clone for LiveNode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
enum LiveNodeKind {
|
enum LiveNodeKind {
|
||||||
FreeVarNode(Span),
|
FreeVarNode(Span),
|
||||||
ExprNode(Span),
|
ExprNode(Span),
|
||||||
|
@ -245,13 +245,13 @@ struct CaptureInfo {
|
||||||
var_nid: NodeId
|
var_nid: NodeId
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
struct LocalInfo {
|
struct LocalInfo {
|
||||||
id: NodeId,
|
id: NodeId,
|
||||||
ident: ast::Ident
|
ident: ast::Ident
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
enum VarKind {
|
enum VarKind {
|
||||||
Arg(NodeId, ast::Ident),
|
Arg(NodeId, ast::Ident),
|
||||||
Local(LocalInfo),
|
Local(LocalInfo),
|
||||||
|
|
|
@ -87,7 +87,7 @@ use syntax::parse::token;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Show)]
|
#[derive(Clone, PartialEq, Debug)]
|
||||||
pub enum categorization<'tcx> {
|
pub enum categorization<'tcx> {
|
||||||
cat_rvalue(ty::Region), // temporary val, argument is its scope
|
cat_rvalue(ty::Region), // temporary val, argument is its scope
|
||||||
cat_static_item,
|
cat_static_item,
|
||||||
|
@ -101,14 +101,14 @@ pub enum categorization<'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Represents any kind of upvar
|
// Represents any kind of upvar
|
||||||
#[derive(Clone, Copy, PartialEq, Show)]
|
#[derive(Clone, Copy, PartialEq, Debug)]
|
||||||
pub struct Upvar {
|
pub struct Upvar {
|
||||||
pub id: ty::UpvarId,
|
pub id: ty::UpvarId,
|
||||||
pub kind: ty::ClosureKind
|
pub kind: ty::ClosureKind
|
||||||
}
|
}
|
||||||
|
|
||||||
// different kinds of pointers:
|
// different kinds of pointers:
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
|
||||||
pub enum PointerKind {
|
pub enum PointerKind {
|
||||||
/// `Box<T>`
|
/// `Box<T>`
|
||||||
Unique,
|
Unique,
|
||||||
|
@ -125,25 +125,25 @@ pub enum PointerKind {
|
||||||
|
|
||||||
// We use the term "interior" to mean "something reachable from the
|
// We use the term "interior" to mean "something reachable from the
|
||||||
// base without a pointer dereference", e.g. a field
|
// 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 {
|
pub enum InteriorKind {
|
||||||
InteriorField(FieldName),
|
InteriorField(FieldName),
|
||||||
InteriorElement(ElementKind),
|
InteriorElement(ElementKind),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
|
||||||
pub enum FieldName {
|
pub enum FieldName {
|
||||||
NamedField(ast::Name),
|
NamedField(ast::Name),
|
||||||
PositionalField(uint)
|
PositionalField(uint)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
|
||||||
pub enum ElementKind {
|
pub enum ElementKind {
|
||||||
VecElement,
|
VecElement,
|
||||||
OtherElement,
|
OtherElement,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
|
||||||
pub enum MutabilityCategory {
|
pub enum MutabilityCategory {
|
||||||
McImmutable, // Immutable.
|
McImmutable, // Immutable.
|
||||||
McDeclared, // Directly declared as mutable.
|
McDeclared, // Directly declared as mutable.
|
||||||
|
@ -155,7 +155,7 @@ pub enum MutabilityCategory {
|
||||||
// Upvar categorization can generate a variable number of nested
|
// Upvar categorization can generate a variable number of nested
|
||||||
// derefs. The note allows detecting them without deep pattern
|
// derefs. The note allows detecting them without deep pattern
|
||||||
// matching on the categorization.
|
// matching on the categorization.
|
||||||
#[derive(Clone, Copy, PartialEq, Show)]
|
#[derive(Clone, Copy, PartialEq, Debug)]
|
||||||
pub enum Note {
|
pub enum Note {
|
||||||
NoteClosureEnv(ty::UpvarId), // Deref through closure env
|
NoteClosureEnv(ty::UpvarId), // Deref through closure env
|
||||||
NoteUpvarRef(ty::UpvarId), // Deref through by-ref upvar
|
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
|
// 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
|
// (`@T`). So use `cmt.ty` to find the type of the value in a consistent
|
||||||
// fashion. For more details, see the method `cat_pattern`
|
// fashion. For more details, see the method `cat_pattern`
|
||||||
#[derive(Clone, PartialEq, Show)]
|
#[derive(Clone, PartialEq, Debug)]
|
||||||
pub struct cmt_<'tcx> {
|
pub struct cmt_<'tcx> {
|
||||||
pub id: ast::NodeId, // id of expr/pat producing this value
|
pub id: ast::NodeId, // id of expr/pat producing this value
|
||||||
pub span: Span, // span of same expr/pat
|
pub span: Span, // span of same expr/pat
|
||||||
|
|
|
@ -35,7 +35,7 @@ pub type PublicItems = NodeSet;
|
||||||
// FIXME: dox
|
// FIXME: dox
|
||||||
pub type LastPrivateMap = NodeMap<LastPrivate>;
|
pub type LastPrivateMap = NodeMap<LastPrivate>;
|
||||||
|
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub enum LastPrivate {
|
pub enum LastPrivate {
|
||||||
LastMod(PrivateDep),
|
LastMod(PrivateDep),
|
||||||
// `use` directives (imports) can refer to two separate definitions in the
|
// `use` directives (imports) can refer to two separate definitions in the
|
||||||
|
@ -49,14 +49,14 @@ pub enum LastPrivate {
|
||||||
type_used: ImportUse},
|
type_used: ImportUse},
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub enum PrivateDep {
|
pub enum PrivateDep {
|
||||||
AllPublic,
|
AllPublic,
|
||||||
DependsOn(ast::DefId),
|
DependsOn(ast::DefId),
|
||||||
}
|
}
|
||||||
|
|
||||||
// How an import is used.
|
// How an import is used.
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
pub enum ImportUse {
|
pub enum ImportUse {
|
||||||
Unused, // The import is not used.
|
Unused, // The import is not used.
|
||||||
Used, // The import is 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
|
/// actually attach a more meaningful ordering to scopes than the one
|
||||||
/// generated via deriving here.
|
/// generated via deriving here.
|
||||||
#[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash, RustcEncodable,
|
#[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash, RustcEncodable,
|
||||||
RustcDecodable, Show, Copy)]
|
RustcDecodable, Debug, Copy)]
|
||||||
pub enum CodeExtent {
|
pub enum CodeExtent {
|
||||||
Misc(ast::NodeId),
|
Misc(ast::NodeId),
|
||||||
Remainder(BlockRemainder),
|
Remainder(BlockRemainder),
|
||||||
|
@ -61,7 +61,7 @@ pub enum CodeExtent {
|
||||||
/// * the subscope with `first_statement_index == 1` is scope of `c`,
|
/// * the subscope with `first_statement_index == 1` is scope of `c`,
|
||||||
/// and thus does not include EXPR_2, but covers the `...`.
|
/// and thus does not include EXPR_2, but covers the `...`.
|
||||||
#[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash, RustcEncodable,
|
#[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash, RustcEncodable,
|
||||||
RustcDecodable, Show, Copy)]
|
RustcDecodable, Debug, Copy)]
|
||||||
pub struct BlockRemainder {
|
pub struct BlockRemainder {
|
||||||
pub block: ast::NodeId,
|
pub block: ast::NodeId,
|
||||||
pub first_statement_index: uint,
|
pub first_statement_index: uint,
|
||||||
|
@ -179,7 +179,7 @@ pub struct RegionMaps {
|
||||||
/// Carries the node id for the innermost block or match expression,
|
/// Carries the node id for the innermost block or match expression,
|
||||||
/// for building up the `var_map` which maps ids to the blocks in
|
/// for building up the `var_map` which maps ids to the blocks in
|
||||||
/// which they were declared.
|
/// which they were declared.
|
||||||
#[derive(PartialEq, Eq, Show, Copy)]
|
#[derive(PartialEq, Eq, Debug, Copy)]
|
||||||
enum InnermostDeclaringBlock {
|
enum InnermostDeclaringBlock {
|
||||||
None,
|
None,
|
||||||
Block(ast::NodeId),
|
Block(ast::NodeId),
|
||||||
|
@ -204,7 +204,7 @@ impl InnermostDeclaringBlock {
|
||||||
/// Contextual information for declarations introduced by a statement
|
/// Contextual information for declarations introduced by a statement
|
||||||
/// (i.e. `let`). It carries node-id's for statement and enclosing
|
/// (i.e. `let`). It carries node-id's for statement and enclosing
|
||||||
/// block both, as well as the statement's index within the block.
|
/// block both, as well as the statement's index within the block.
|
||||||
#[derive(PartialEq, Eq, Show, Copy)]
|
#[derive(PartialEq, Eq, Debug, Copy)]
|
||||||
struct DeclaringStatementContext {
|
struct DeclaringStatementContext {
|
||||||
stmt_id: ast::NodeId,
|
stmt_id: ast::NodeId,
|
||||||
block_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 {
|
enum InnermostEnclosingExpr {
|
||||||
None,
|
None,
|
||||||
Some(ast::NodeId),
|
Some(ast::NodeId),
|
||||||
|
@ -242,7 +242,7 @@ impl InnermostEnclosingExpr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Show, Copy)]
|
#[derive(Debug, Copy)]
|
||||||
pub struct Context {
|
pub struct Context {
|
||||||
var_parent: InnermostDeclaringBlock,
|
var_parent: InnermostDeclaringBlock,
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ use syntax::visit;
|
||||||
use syntax::visit::Visitor;
|
use syntax::visit::Visitor;
|
||||||
use util::nodemap::NodeMap;
|
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 {
|
pub enum DefRegion {
|
||||||
DefStaticRegion,
|
DefStaticRegion,
|
||||||
DefEarlyBoundRegion(/* space */ subst::ParamSpace,
|
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
|
/// identify each in-scope parameter by an *index* and a *parameter
|
||||||
/// space* (which indices where the parameter is defined; see
|
/// space* (which indices where the parameter is defined; see
|
||||||
/// `ParamSpace`).
|
/// `ParamSpace`).
|
||||||
#[derive(Clone, PartialEq, Eq, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
|
||||||
pub struct Substs<'tcx> {
|
pub struct Substs<'tcx> {
|
||||||
pub types: VecPerParamSpace<Ty<'tcx>>,
|
pub types: VecPerParamSpace<Ty<'tcx>>,
|
||||||
pub regions: RegionSubsts,
|
pub regions: RegionSubsts,
|
||||||
|
@ -37,7 +37,7 @@ pub struct Substs<'tcx> {
|
||||||
/// Represents the values to use when substituting lifetime parameters.
|
/// Represents the values to use when substituting lifetime parameters.
|
||||||
/// If the value is `ErasedRegions`, then this subst is occurring during
|
/// If the value is `ErasedRegions`, then this subst is occurring during
|
||||||
/// trans, and all region parameters will be replaced with `ty::ReStatic`.
|
/// 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 {
|
pub enum RegionSubsts {
|
||||||
ErasedRegions,
|
ErasedRegions,
|
||||||
NonerasedRegions(VecPerParamSpace<ty::Region>)
|
NonerasedRegions(VecPerParamSpace<ty::Region>)
|
||||||
|
@ -180,7 +180,7 @@ impl RegionSubsts {
|
||||||
// ParamSpace
|
// ParamSpace
|
||||||
|
|
||||||
#[derive(PartialOrd, Ord, PartialEq, Eq, Copy,
|
#[derive(PartialOrd, Ord, PartialEq, Eq, Copy,
|
||||||
Clone, Hash, RustcEncodable, RustcDecodable, Show)]
|
Clone, Hash, RustcEncodable, RustcDecodable, Debug)]
|
||||||
pub enum ParamSpace {
|
pub enum ParamSpace {
|
||||||
TypeSpace, // Type parameters attached to a type definition, trait, or impl
|
TypeSpace, // Type parameters attached to a type definition, trait, or impl
|
||||||
SelfSpace, // Self parameter on a trait
|
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>>;
|
pub type Selection<'tcx> = Vtable<'tcx, PredicateObligation<'tcx>>;
|
||||||
|
|
||||||
#[derive(Clone,Show)]
|
#[derive(Clone,Debug)]
|
||||||
pub enum SelectionError<'tcx> {
|
pub enum SelectionError<'tcx> {
|
||||||
Unimplemented,
|
Unimplemented,
|
||||||
Overflow,
|
Overflow,
|
||||||
|
@ -215,7 +215,7 @@ pub type SelectionResult<'tcx, T> = Result<Option<T>, SelectionError<'tcx>>;
|
||||||
/// ### The type parameter `N`
|
/// ### The type parameter `N`
|
||||||
///
|
///
|
||||||
/// See explanation on `VtableImplData`.
|
/// See explanation on `VtableImplData`.
|
||||||
#[derive(Show,Clone)]
|
#[derive(Debug,Clone)]
|
||||||
pub enum Vtable<'tcx, N> {
|
pub enum Vtable<'tcx, N> {
|
||||||
/// Vtable identifying a particular impl.
|
/// Vtable identifying a particular impl.
|
||||||
VtableImpl(VtableImplData<'tcx, N>),
|
VtableImpl(VtableImplData<'tcx, N>),
|
||||||
|
@ -258,7 +258,7 @@ pub struct VtableImplData<'tcx, N> {
|
||||||
pub nested: subst::VecPerParamSpace<N>
|
pub nested: subst::VecPerParamSpace<N>
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Show,Clone)]
|
#[derive(Debug,Clone)]
|
||||||
pub struct VtableBuiltinData<N> {
|
pub struct VtableBuiltinData<N> {
|
||||||
pub nested: subst::VecPerParamSpace<N>
|
pub nested: subst::VecPerParamSpace<N>
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ pub enum ObjectSafetyViolation<'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Reasons a method might not be object-safe.
|
/// Reasons a method might not be object-safe.
|
||||||
#[derive(Copy,Clone,Show)]
|
#[derive(Copy,Clone,Debug)]
|
||||||
pub enum MethodViolationCode {
|
pub enum MethodViolationCode {
|
||||||
/// e.g., `fn(self)`
|
/// e.g., `fn(self)`
|
||||||
ByValueSelf,
|
ByValueSelf,
|
||||||
|
|
|
@ -96,7 +96,7 @@ pub enum MethodMatchResult {
|
||||||
MethodDidNotMatch,
|
MethodDidNotMatch,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub enum MethodMatchedData {
|
pub enum MethodMatchedData {
|
||||||
// In the case of a precise match, we don't really need to store
|
// In the case of a precise match, we don't really need to store
|
||||||
// how the match was found. So don't.
|
// 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
|
/// matching where clause. Part of the reason for this is that where
|
||||||
/// clauses can give additional information (like, the types of output
|
/// clauses can give additional information (like, the types of output
|
||||||
/// parameters) that would have to be inferred from the impl.
|
/// parameters) that would have to be inferred from the impl.
|
||||||
#[derive(PartialEq,Eq,Show,Clone)]
|
#[derive(PartialEq,Eq,Debug,Clone)]
|
||||||
enum SelectionCandidate<'tcx> {
|
enum SelectionCandidate<'tcx> {
|
||||||
BuiltinCandidate(ty::BuiltinBound),
|
BuiltinCandidate(ty::BuiltinBound),
|
||||||
ParamCandidate(ty::PolyTraitRef<'tcx>),
|
ParamCandidate(ty::PolyTraitRef<'tcx>),
|
||||||
|
@ -172,7 +172,7 @@ enum BuiltinBoundConditions<'tcx> {
|
||||||
AmbiguousBuiltin
|
AmbiguousBuiltin
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
enum EvaluationResult<'tcx> {
|
enum EvaluationResult<'tcx> {
|
||||||
EvaluatedToOk,
|
EvaluatedToOk,
|
||||||
EvaluatedToAmbig,
|
EvaluatedToAmbig,
|
||||||
|
|
|
@ -112,7 +112,7 @@ pub struct field<'tcx> {
|
||||||
pub mt: mt<'tcx>
|
pub mt: mt<'tcx>
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Show)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
pub enum ImplOrTraitItemContainer {
|
pub enum ImplOrTraitItemContainer {
|
||||||
TraitContainer(ast::DefId),
|
TraitContainer(ast::DefId),
|
||||||
ImplContainer(ast::DefId),
|
ImplContainer(ast::DefId),
|
||||||
|
@ -127,7 +127,7 @@ impl ImplOrTraitItemContainer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum ImplOrTraitItem<'tcx> {
|
pub enum ImplOrTraitItem<'tcx> {
|
||||||
MethodTraitItem(Rc<Method<'tcx>>),
|
MethodTraitItem(Rc<Method<'tcx>>),
|
||||||
TypeTraitItem(Rc<AssociatedType>),
|
TypeTraitItem(Rc<AssociatedType>),
|
||||||
|
@ -172,7 +172,7 @@ impl<'tcx> ImplOrTraitItem<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Show)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
pub enum ImplOrTraitItemId {
|
pub enum ImplOrTraitItemId {
|
||||||
MethodTraitItemId(ast::DefId),
|
MethodTraitItemId(ast::DefId),
|
||||||
TypeTraitItemId(ast::DefId),
|
TypeTraitItemId(ast::DefId),
|
||||||
|
@ -187,7 +187,7 @@ impl ImplOrTraitItemId {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct Method<'tcx> {
|
pub struct Method<'tcx> {
|
||||||
pub name: ast::Name,
|
pub name: ast::Name,
|
||||||
pub generics: ty::Generics<'tcx>,
|
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 struct AssociatedType {
|
||||||
pub name: ast::Name,
|
pub name: ast::Name,
|
||||||
pub vis: ast::Visibility,
|
pub vis: ast::Visibility,
|
||||||
|
@ -239,13 +239,13 @@ pub struct AssociatedType {
|
||||||
pub container: ImplOrTraitItemContainer,
|
pub container: ImplOrTraitItemContainer,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
|
||||||
pub struct mt<'tcx> {
|
pub struct mt<'tcx> {
|
||||||
pub ty: Ty<'tcx>,
|
pub ty: Ty<'tcx>,
|
||||||
pub mutbl: ast::Mutability,
|
pub mutbl: ast::Mutability,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Show)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
pub struct field_ty {
|
pub struct field_ty {
|
||||||
pub name: Name,
|
pub name: Name,
|
||||||
pub id: DefId,
|
pub id: DefId,
|
||||||
|
@ -274,7 +274,7 @@ pub struct ItemVariances {
|
||||||
pub regions: VecPerParamSpace<Variance>,
|
pub regions: VecPerParamSpace<Variance>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, RustcDecodable, RustcEncodable, Show, Copy)]
|
#[derive(Clone, PartialEq, RustcDecodable, RustcEncodable, Debug, Copy)]
|
||||||
pub enum Variance {
|
pub enum Variance {
|
||||||
Covariant, // T<A> <: T<B> iff A <: B -- e.g., function return type
|
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
|
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
|
Bivariant, // T<A> <: T<B> -- e.g., unused type parameter
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum AutoAdjustment<'tcx> {
|
pub enum AutoAdjustment<'tcx> {
|
||||||
AdjustReifyFnPointer(ast::DefId), // go from a fn-item type to a fn-pointer type
|
AdjustReifyFnPointer(ast::DefId), // go from a fn-item type to a fn-pointer type
|
||||||
AdjustDerefRef(AutoDerefRef<'tcx>)
|
AdjustDerefRef(AutoDerefRef<'tcx>)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Show)]
|
#[derive(Clone, PartialEq, Debug)]
|
||||||
pub enum UnsizeKind<'tcx> {
|
pub enum UnsizeKind<'tcx> {
|
||||||
// [T, ..n] -> [T], the uint field is n.
|
// [T, ..n] -> [T], the uint field is n.
|
||||||
UnsizeLength(uint),
|
UnsizeLength(uint),
|
||||||
|
@ -298,13 +298,13 @@ pub enum UnsizeKind<'tcx> {
|
||||||
UnsizeVtable(TyTrait<'tcx>, /* the self type of the trait */ Ty<'tcx>)
|
UnsizeVtable(TyTrait<'tcx>, /* the self type of the trait */ Ty<'tcx>)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct AutoDerefRef<'tcx> {
|
pub struct AutoDerefRef<'tcx> {
|
||||||
pub autoderefs: uint,
|
pub autoderefs: uint,
|
||||||
pub autoref: Option<AutoRef<'tcx>>
|
pub autoref: Option<AutoRef<'tcx>>
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Show)]
|
#[derive(Clone, PartialEq, Debug)]
|
||||||
pub enum AutoRef<'tcx> {
|
pub enum AutoRef<'tcx> {
|
||||||
/// Convert from T to &T
|
/// Convert from T to &T
|
||||||
/// The third field allows us to wrap other AutoRef adjustments.
|
/// 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 struct param_index {
|
||||||
pub space: subst::ParamSpace,
|
pub space: subst::ParamSpace,
|
||||||
pub index: uint
|
pub index: uint
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum MethodOrigin<'tcx> {
|
pub enum MethodOrigin<'tcx> {
|
||||||
// fully statically resolved method
|
// fully statically resolved method
|
||||||
MethodStatic(ast::DefId),
|
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
|
// details for a method invoked with a receiver whose type is a type parameter
|
||||||
// with a bounded trait.
|
// with a bounded trait.
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct MethodParam<'tcx> {
|
pub struct MethodParam<'tcx> {
|
||||||
// the precise trait reference that occurs as a bound -- this may
|
// the precise trait reference that occurs as a bound -- this may
|
||||||
// be a supertrait of what the user actually typed. Note that it
|
// 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
|
// details for a method invoked with a receiver whose type is an object
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct MethodObject<'tcx> {
|
pub struct MethodObject<'tcx> {
|
||||||
// the (super)trait containing the method to be invoked
|
// the (super)trait containing the method to be invoked
|
||||||
pub trait_ref: Rc<ty::TraitRef<'tcx>>,
|
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
|
/// needed to add to the side tables. Thus to disambiguate
|
||||||
/// we also keep track of whether there's an adjustment in
|
/// we also keep track of whether there's an adjustment in
|
||||||
/// our key.
|
/// our key.
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
|
||||||
pub struct MethodCall {
|
pub struct MethodCall {
|
||||||
pub expr_id: ast::NodeId,
|
pub expr_id: ast::NodeId,
|
||||||
pub adjustment: ExprAdjustment
|
pub adjustment: ExprAdjustment
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Hash, Show, RustcEncodable, RustcDecodable, Copy)]
|
#[derive(Clone, PartialEq, Eq, Hash, Debug, RustcEncodable, RustcDecodable, Copy)]
|
||||||
pub enum ExprAdjustment {
|
pub enum ExprAdjustment {
|
||||||
NoAdjustment,
|
NoAdjustment,
|
||||||
AutoDeref(uint),
|
AutoDeref(uint),
|
||||||
|
@ -923,7 +923,7 @@ impl<'tcx> ctxt<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
pub struct TyS<'tcx> {
|
pub struct TyS<'tcx> {
|
||||||
pub sty: sty<'tcx>,
|
pub sty: sty<'tcx>,
|
||||||
pub flags: TypeFlags,
|
pub flags: TypeFlags,
|
||||||
|
@ -1029,21 +1029,21 @@ pub fn type_escapes_depth(ty: Ty, depth: u32) -> bool {
|
||||||
ty.region_depth > depth
|
ty.region_depth > depth
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
|
||||||
pub struct BareFnTy<'tcx> {
|
pub struct BareFnTy<'tcx> {
|
||||||
pub unsafety: ast::Unsafety,
|
pub unsafety: ast::Unsafety,
|
||||||
pub abi: abi::Abi,
|
pub abi: abi::Abi,
|
||||||
pub sig: PolyFnSig<'tcx>,
|
pub sig: PolyFnSig<'tcx>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
|
||||||
pub struct ClosureTy<'tcx> {
|
pub struct ClosureTy<'tcx> {
|
||||||
pub unsafety: ast::Unsafety,
|
pub unsafety: ast::Unsafety,
|
||||||
pub abi: abi::Abi,
|
pub abi: abi::Abi,
|
||||||
pub sig: PolyFnSig<'tcx>,
|
pub sig: PolyFnSig<'tcx>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
|
||||||
pub enum FnOutput<'tcx> {
|
pub enum FnOutput<'tcx> {
|
||||||
FnConverging(Ty<'tcx>),
|
FnConverging(Ty<'tcx>),
|
||||||
FnDiverging
|
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 struct ParamTy {
|
||||||
pub space: subst::ParamSpace,
|
pub space: subst::ParamSpace,
|
||||||
pub idx: u32,
|
pub idx: u32,
|
||||||
|
@ -1146,7 +1146,7 @@ pub struct ParamTy {
|
||||||
/// is the outer fn.
|
/// is the outer fn.
|
||||||
///
|
///
|
||||||
/// [dbi]: http://en.wikipedia.org/wiki/De_Bruijn_index
|
/// [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 {
|
pub struct DebruijnIndex {
|
||||||
// We maintain the invariant that this is never 0. So 1 indicates
|
// We maintain the invariant that this is never 0. So 1 indicates
|
||||||
// the innermost binder. To ensure this, create with `DebruijnIndex::new`.
|
// the innermost binder. To ensure this, create with `DebruijnIndex::new`.
|
||||||
|
@ -1154,7 +1154,7 @@ pub struct DebruijnIndex {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Representation of regions:
|
/// Representation of regions:
|
||||||
#[derive(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Show, Copy)]
|
#[derive(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Debug, Copy)]
|
||||||
pub enum Region {
|
pub enum Region {
|
||||||
// Region bound in a type or fn declaration which will be
|
// Region bound in a type or fn declaration which will be
|
||||||
// substituted 'early' -- that is, at the same time when type
|
// 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
|
/// 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
|
/// the original var id (that is, the root variable that is referenced
|
||||||
/// by the upvar) and the id of the closure expression.
|
/// 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 struct UpvarId {
|
||||||
pub var_id: ast::NodeId,
|
pub var_id: ast::NodeId,
|
||||||
pub closure_expr_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 {
|
pub enum BorrowKind {
|
||||||
/// Data must be immutable and is aliasable.
|
/// Data must be immutable and is aliasable.
|
||||||
ImmBorrow,
|
ImmBorrow,
|
||||||
|
@ -1294,7 +1294,7 @@ pub enum BorrowKind {
|
||||||
/// - Through mutation, the borrowed upvars can actually escape
|
/// - Through mutation, the borrowed upvars can actually escape
|
||||||
/// the closure, so sometimes it is necessary for them to be larger
|
/// the closure, so sometimes it is necessary for them to be larger
|
||||||
/// than the closure lifetime itself.
|
/// than the closure lifetime itself.
|
||||||
#[derive(PartialEq, Clone, RustcEncodable, RustcDecodable, Show, Copy)]
|
#[derive(PartialEq, Clone, RustcEncodable, RustcDecodable, Debug, Copy)]
|
||||||
pub struct UpvarBorrow {
|
pub struct UpvarBorrow {
|
||||||
pub kind: BorrowKind,
|
pub kind: BorrowKind,
|
||||||
pub region: ty::Region,
|
pub region: ty::Region,
|
||||||
|
@ -1320,7 +1320,7 @@ impl Region {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash,
|
#[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
|
/// A "free" region `fr` can be interpreted as "some region
|
||||||
/// at least as big as the scope `fr.scope`".
|
/// at least as big as the scope `fr.scope`".
|
||||||
pub struct FreeRegion {
|
pub struct FreeRegion {
|
||||||
|
@ -1329,7 +1329,7 @@ pub struct FreeRegion {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash,
|
#[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash,
|
||||||
RustcEncodable, RustcDecodable, Show, Copy)]
|
RustcEncodable, RustcDecodable, Debug, Copy)]
|
||||||
pub enum BoundRegion {
|
pub enum BoundRegion {
|
||||||
/// An anonymous region parameter for a given fn (&T)
|
/// An anonymous region parameter for a given fn (&T)
|
||||||
BrAnon(u32),
|
BrAnon(u32),
|
||||||
|
@ -1350,7 +1350,7 @@ pub enum BoundRegion {
|
||||||
|
|
||||||
// NB: If you change this, you'll probably want to change the corresponding
|
// NB: If you change this, you'll probably want to change the corresponding
|
||||||
// AST structure in libsyntax/ast.rs as well.
|
// AST structure in libsyntax/ast.rs as well.
|
||||||
#[derive(Clone, PartialEq, Eq, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
|
||||||
pub enum sty<'tcx> {
|
pub enum sty<'tcx> {
|
||||||
ty_bool,
|
ty_bool,
|
||||||
ty_char,
|
ty_char,
|
||||||
|
@ -1397,7 +1397,7 @@ pub enum sty<'tcx> {
|
||||||
// on non-useful type error messages)
|
// on non-useful type error messages)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
|
||||||
pub struct TyTrait<'tcx> {
|
pub struct TyTrait<'tcx> {
|
||||||
pub principal: ty::PolyTraitRef<'tcx>,
|
pub principal: ty::PolyTraitRef<'tcx>,
|
||||||
pub bounds: ExistentialBounds<'tcx>,
|
pub bounds: ExistentialBounds<'tcx>,
|
||||||
|
@ -1469,7 +1469,7 @@ impl<'tcx> TyTrait<'tcx> {
|
||||||
/// Note that a `TraitRef` introduces a level of region binding, to
|
/// Note that a `TraitRef` introduces a level of region binding, to
|
||||||
/// account for higher-ranked trait bounds like `T : for<'a> Foo<&'a
|
/// account for higher-ranked trait bounds like `T : for<'a> Foo<&'a
|
||||||
/// U>` or higher-ranked object types.
|
/// U>` or higher-ranked object types.
|
||||||
#[derive(Clone, PartialEq, Eq, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
|
||||||
pub struct TraitRef<'tcx> {
|
pub struct TraitRef<'tcx> {
|
||||||
pub def_id: DefId,
|
pub def_id: DefId,
|
||||||
pub substs: &'tcx Substs<'tcx>,
|
pub substs: &'tcx Substs<'tcx>,
|
||||||
|
@ -1509,7 +1509,7 @@ impl<'tcx> PolyTraitRef<'tcx> {
|
||||||
/// erase, or otherwise "discharge" these bound reons, we change the
|
/// erase, or otherwise "discharge" these bound reons, we change the
|
||||||
/// type from `Binder<T>` to just `T` (see
|
/// type from `Binder<T>` to just `T` (see
|
||||||
/// e.g. `liberate_late_bound_regions`).
|
/// e.g. `liberate_late_bound_regions`).
|
||||||
#[derive(Clone, PartialEq, Eq, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
|
||||||
pub struct Binder<T>(pub T);
|
pub struct Binder<T>(pub T);
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq)]
|
#[derive(Clone, Copy, PartialEq)]
|
||||||
|
@ -1518,7 +1518,7 @@ pub enum IntVarValue {
|
||||||
UintType(ast::UintTy),
|
UintType(ast::UintTy),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Show)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
pub enum terr_vstore_kind {
|
pub enum terr_vstore_kind {
|
||||||
terr_vec,
|
terr_vec,
|
||||||
terr_str,
|
terr_str,
|
||||||
|
@ -1526,14 +1526,14 @@ pub enum terr_vstore_kind {
|
||||||
terr_trait
|
terr_trait
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Show)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
pub struct expected_found<T> {
|
pub struct expected_found<T> {
|
||||||
pub expected: T,
|
pub expected: T,
|
||||||
pub found: T
|
pub found: T
|
||||||
}
|
}
|
||||||
|
|
||||||
// Data structures used in type unification
|
// Data structures used in type unification
|
||||||
#[derive(Clone, Copy, Show)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
pub enum type_err<'tcx> {
|
pub enum type_err<'tcx> {
|
||||||
terr_mismatch,
|
terr_mismatch,
|
||||||
terr_unsafety_mismatch(expected_found<ast::Unsafety>),
|
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>`
|
/// Bounds suitable for a named type parameter like `A` in `fn foo<A>`
|
||||||
/// as well as the existential type parameter in an object type.
|
/// 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 struct ParamBounds<'tcx> {
|
||||||
pub region_bounds: Vec<ty::Region>,
|
pub region_bounds: Vec<ty::Region>,
|
||||||
pub builtin_bounds: BuiltinBounds,
|
pub builtin_bounds: BuiltinBounds,
|
||||||
|
@ -1580,7 +1580,7 @@ pub struct ParamBounds<'tcx> {
|
||||||
/// major difference between this case and `ParamBounds` is that
|
/// major difference between this case and `ParamBounds` is that
|
||||||
/// general purpose trait bounds are omitted and there must be
|
/// general purpose trait bounds are omitted and there must be
|
||||||
/// *exactly one* region.
|
/// *exactly one* region.
|
||||||
#[derive(PartialEq, Eq, Hash, Clone, Show)]
|
#[derive(PartialEq, Eq, Hash, Clone, Debug)]
|
||||||
pub struct ExistentialBounds<'tcx> {
|
pub struct ExistentialBounds<'tcx> {
|
||||||
pub region_bound: ty::Region,
|
pub region_bound: ty::Region,
|
||||||
pub builtin_bounds: BuiltinBounds,
|
pub builtin_bounds: BuiltinBounds,
|
||||||
|
@ -1590,7 +1590,7 @@ pub struct ExistentialBounds<'tcx> {
|
||||||
pub type BuiltinBounds = EnumSet<BuiltinBound>;
|
pub type BuiltinBounds = EnumSet<BuiltinBound>;
|
||||||
|
|
||||||
#[derive(Clone, RustcEncodable, PartialEq, Eq, RustcDecodable, Hash,
|
#[derive(Clone, RustcEncodable, PartialEq, Eq, RustcDecodable, Hash,
|
||||||
Show, Copy)]
|
Debug, Copy)]
|
||||||
#[repr(uint)]
|
#[repr(uint)]
|
||||||
pub enum BuiltinBound {
|
pub enum BuiltinBound {
|
||||||
BoundSend,
|
BoundSend,
|
||||||
|
@ -1664,7 +1664,7 @@ pub enum InferTy {
|
||||||
FreshIntTy(u32),
|
FreshIntTy(u32),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)]
|
||||||
pub enum UnconstrainedNumeric {
|
pub enum UnconstrainedNumeric {
|
||||||
UnconstrainedFloat,
|
UnconstrainedFloat,
|
||||||
UnconstrainedInt,
|
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 {
|
pub enum InferRegion {
|
||||||
ReVar(RegionVid),
|
ReVar(RegionVid),
|
||||||
ReSkolemized(u32, BoundRegion)
|
ReSkolemized(u32, BoundRegion)
|
||||||
|
@ -1746,7 +1746,7 @@ impl fmt::Debug for IntVarValue {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct TypeParameterDef<'tcx> {
|
pub struct TypeParameterDef<'tcx> {
|
||||||
pub name: ast::Name,
|
pub name: ast::Name,
|
||||||
pub def_id: ast::DefId,
|
pub def_id: ast::DefId,
|
||||||
|
@ -1756,7 +1756,7 @@ pub struct TypeParameterDef<'tcx> {
|
||||||
pub default: Option<Ty<'tcx>>,
|
pub default: Option<Ty<'tcx>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(RustcEncodable, RustcDecodable, Clone, Show)]
|
#[derive(RustcEncodable, RustcDecodable, Clone, Debug)]
|
||||||
pub struct RegionParameterDef {
|
pub struct RegionParameterDef {
|
||||||
pub name: ast::Name,
|
pub name: ast::Name,
|
||||||
pub def_id: ast::DefId,
|
pub def_id: ast::DefId,
|
||||||
|
@ -1773,7 +1773,7 @@ impl RegionParameterDef {
|
||||||
|
|
||||||
/// Information about the formal type/lifetime parameters associated
|
/// Information about the formal type/lifetime parameters associated
|
||||||
/// with an item or method. Analogous to ast::Generics.
|
/// with an item or method. Analogous to ast::Generics.
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct Generics<'tcx> {
|
pub struct Generics<'tcx> {
|
||||||
pub types: VecPerParamSpace<TypeParameterDef<'tcx>>,
|
pub types: VecPerParamSpace<TypeParameterDef<'tcx>>,
|
||||||
pub regions: VecPerParamSpace<RegionParameterDef>,
|
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> {
|
pub enum Predicate<'tcx> {
|
||||||
/// Corresponds to `where Foo : Bar<A,B,C>`. `Foo` here would be
|
/// Corresponds to `where Foo : Bar<A,B,C>`. `Foo` here would be
|
||||||
/// the `Self` type of the trait reference and `A`, `B`, and `C`
|
/// the `Self` type of the trait reference and `A`, `B`, and `C`
|
||||||
|
@ -1830,7 +1830,7 @@ pub enum Predicate<'tcx> {
|
||||||
Projection(PolyProjectionPredicate<'tcx>),
|
Projection(PolyProjectionPredicate<'tcx>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
|
||||||
pub struct TraitPredicate<'tcx> {
|
pub struct TraitPredicate<'tcx> {
|
||||||
pub trait_ref: Rc<TraitRef<'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 struct EquatePredicate<'tcx>(pub Ty<'tcx>, pub Ty<'tcx>); // `0 == 1`
|
||||||
pub type PolyEquatePredicate<'tcx> = ty::Binder<EquatePredicate<'tcx>>;
|
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 struct OutlivesPredicate<A,B>(pub A, pub B); // `A : B`
|
||||||
pub type PolyOutlivesPredicate<A,B> = ty::Binder<OutlivesPredicate<A,B>>;
|
pub type PolyOutlivesPredicate<A,B> = ty::Binder<OutlivesPredicate<A,B>>;
|
||||||
pub type PolyRegionOutlivesPredicate = PolyOutlivesPredicate<ty::Region, ty::Region>;
|
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
|
/// equality between arbitrary types. Processing an instance of Form
|
||||||
/// #2 eventually yields one of these `ProjectionPredicate`
|
/// #2 eventually yields one of these `ProjectionPredicate`
|
||||||
/// instances to normalize the LHS.
|
/// instances to normalize the LHS.
|
||||||
#[derive(Clone, PartialEq, Eq, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
|
||||||
pub struct ProjectionPredicate<'tcx> {
|
pub struct ProjectionPredicate<'tcx> {
|
||||||
pub projection_ty: ProjectionTy<'tcx>,
|
pub projection_ty: ProjectionTy<'tcx>,
|
||||||
pub ty: Ty<'tcx>,
|
pub ty: Ty<'tcx>,
|
||||||
|
@ -1898,7 +1898,7 @@ impl<'tcx> PolyProjectionPredicate<'tcx> {
|
||||||
|
|
||||||
/// Represents the projection of an associated type. In explicit UFCS
|
/// Represents the projection of an associated type. In explicit UFCS
|
||||||
/// form this would be written `<T as Trait<..>>::N`.
|
/// 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> {
|
pub struct ProjectionTy<'tcx> {
|
||||||
/// The trait reference `T as Trait<..>`.
|
/// The trait reference `T as Trait<..>`.
|
||||||
pub trait_ref: Rc<ty::TraitRef<'tcx>>,
|
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
|
/// `[[], [U:Bar<T>]]`. Now if there were some particular reference
|
||||||
/// like `Foo<int,uint>`, then the `GenericBounds` would be `[[],
|
/// like `Foo<int,uint>`, then the `GenericBounds` would be `[[],
|
||||||
/// [uint:Bar<int>]]`.
|
/// [uint:Bar<int>]]`.
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct GenericBounds<'tcx> {
|
pub struct GenericBounds<'tcx> {
|
||||||
pub predicates: VecPerParamSpace<Predicate<'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
|
/// stray references in a comment or something). We try to reserve the
|
||||||
/// "poly" prefix to refer to higher-ranked things, as in
|
/// "poly" prefix to refer to higher-ranked things, as in
|
||||||
/// `PolyTraitRef`.
|
/// `PolyTraitRef`.
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct TypeScheme<'tcx> {
|
pub struct TypeScheme<'tcx> {
|
||||||
pub generics: Generics<'tcx>,
|
pub generics: Generics<'tcx>,
|
||||||
pub ty: Ty<'tcx>
|
pub ty: Ty<'tcx>
|
||||||
|
@ -2286,7 +2286,7 @@ pub struct Closure<'tcx> {
|
||||||
pub kind: ClosureKind,
|
pub kind: ClosureKind,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Show)]
|
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
|
||||||
pub enum ClosureKind {
|
pub enum ClosureKind {
|
||||||
FnClosureKind,
|
FnClosureKind,
|
||||||
FnMutClosureKind,
|
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
|
/// The ordering of the cases is significant. They are sorted so that cmp::max
|
||||||
/// will keep the "more erroneous" of two values.
|
/// 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 {
|
pub enum Representability {
|
||||||
Representable,
|
Representable,
|
||||||
ContainsRecursive,
|
ContainsRecursive,
|
||||||
|
@ -6536,7 +6536,7 @@ impl<'a,'tcx> ClosureTyper<'tcx> for ty::ParameterEnvironment<'a,'tcx> {
|
||||||
|
|
||||||
|
|
||||||
/// The category of explicit self.
|
/// The category of explicit self.
|
||||||
#[derive(Clone, Copy, Eq, PartialEq, Show)]
|
#[derive(Clone, Copy, Eq, PartialEq, Debug)]
|
||||||
pub enum ExplicitSelfCategory {
|
pub enum ExplicitSelfCategory {
|
||||||
StaticExplicitSelfCategory,
|
StaticExplicitSelfCategory,
|
||||||
ByValueExplicitSelfCategory,
|
ByValueExplicitSelfCategory,
|
||||||
|
|
|
@ -249,7 +249,7 @@ pub enum EntryFnType {
|
||||||
EntryNone,
|
EntryNone,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, PartialOrd, Clone, Ord, Eq, Hash, Show)]
|
#[derive(Copy, PartialEq, PartialOrd, Clone, Ord, Eq, Hash, Debug)]
|
||||||
pub enum CrateType {
|
pub enum CrateType {
|
||||||
CrateTypeExecutable,
|
CrateTypeExecutable,
|
||||||
CrateTypeDylib,
|
CrateTypeDylib,
|
||||||
|
@ -672,7 +672,7 @@ pub fn optgroups() -> Vec<getopts::OptGroup> {
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, Show)]
|
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||||
pub enum OptionStability { Stable, Unstable }
|
pub enum OptionStability { Stable, Unstable }
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq)]
|
#[derive(Clone, PartialEq, Eq)]
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
use std::slice;
|
use std::slice;
|
||||||
|
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct SearchPaths {
|
pub struct SearchPaths {
|
||||||
paths: Vec<(PathKind, Path)>,
|
paths: Vec<(PathKind, Path)>,
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ pub struct Iter<'a> {
|
||||||
iter: slice::Iter<'a, (PathKind, Path)>,
|
iter: slice::Iter<'a, (PathKind, Path)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Eq, PartialEq, Clone, Copy, Show)]
|
#[derive(Eq, PartialEq, Clone, Copy, Debug)]
|
||||||
pub enum PathKind {
|
pub enum PathKind {
|
||||||
Native,
|
Native,
|
||||||
Crate,
|
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
|
// Useful type to use with `Result<>` indicate that an error has already
|
||||||
// been reported to the user, so no need to continue checking.
|
// been reported to the user, so no need to continue checking.
|
||||||
#[derive(Clone, Copy, Show)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
pub struct ErrorReported;
|
pub struct ErrorReported;
|
||||||
|
|
||||||
pub fn time<T, U, F>(do_it: bool, what: &str, u: U, f: F) -> T where
|
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::ast;
|
||||||
use syntax::visit;
|
use syntax::visit;
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Show)]
|
#[derive(Clone, PartialEq, Debug)]
|
||||||
pub struct Svh {
|
pub struct Svh {
|
||||||
hash: String,
|
hash: String,
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ mod x86_64_unknown_linux_gnu;
|
||||||
/// Everything `rustc` knows about how to compile for a specific target.
|
/// Everything `rustc` knows about how to compile for a specific target.
|
||||||
///
|
///
|
||||||
/// Every field here must be specified, and has no default value.
|
/// Every field here must be specified, and has no default value.
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct Target {
|
pub struct Target {
|
||||||
/// [Data layout](http://llvm.org/docs/LangRef.html#data-layout) to pass to LLVM.
|
/// [Data layout](http://llvm.org/docs/LangRef.html#data-layout) to pass to LLVM.
|
||||||
pub data_layout: String,
|
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,
|
/// 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.
|
/// 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 {
|
pub struct TargetOptions {
|
||||||
/// Linker to invoke. Defaults to "cc".
|
/// Linker to invoke. Defaults to "cc".
|
||||||
pub linker: String,
|
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 {
|
/// fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
/// write!(f, "hi!")
|
/// write!(f, "hi!")
|
||||||
/// }
|
/// }
|
||||||
|
|
|
@ -21,7 +21,7 @@ use syntax::codemap::Span;
|
||||||
|
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
pub enum RestrictionResult<'tcx> {
|
pub enum RestrictionResult<'tcx> {
|
||||||
Safe,
|
Safe,
|
||||||
SafeIf(Rc<LoanPath<'tcx>>, Vec<Rc<LoanPath<'tcx>>>)
|
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> {
|
pub struct LoanPath<'tcx> {
|
||||||
kind: LoanPathKind<'tcx>,
|
kind: LoanPathKind<'tcx>,
|
||||||
ty: ty::Ty<'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> {
|
pub enum LoanPathKind<'tcx> {
|
||||||
LpVar(ast::NodeId), // `x` in doc.rs
|
LpVar(ast::NodeId), // `x` in doc.rs
|
||||||
LpUpvar(ty::UpvarId), // `x` captured by-value into closure
|
LpUpvar(ty::UpvarId), // `x` captured by-value into closure
|
||||||
|
@ -314,7 +314,7 @@ impl<'tcx> LoanPath<'tcx> {
|
||||||
// b2b39e8700e37ad32b486b9a8409b50a8a53aa51#commitcomment-7892003
|
// b2b39e8700e37ad32b486b9a8409b50a8a53aa51#commitcomment-7892003
|
||||||
static DOWNCAST_PRINTED_OPERATOR : &'static str = " as ";
|
static DOWNCAST_PRINTED_OPERATOR : &'static str = " as ";
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Eq, Hash, Show)]
|
#[derive(Copy, PartialEq, Eq, Hash, Debug)]
|
||||||
pub enum LoanPathElem {
|
pub enum LoanPathElem {
|
||||||
LpDeref(mc::PointerKind), // `*LV` in doc.rs
|
LpDeref(mc::PointerKind), // `*LV` in doc.rs
|
||||||
LpInterior(mc::InteriorKind) // `LV.f` in doc.rs
|
LpInterior(mc::InteriorKind) // `LV.f` in doc.rs
|
||||||
|
@ -487,7 +487,7 @@ pub enum AliasableViolationKind {
|
||||||
BorrowViolation(euv::LoanCause)
|
BorrowViolation(euv::LoanCause)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub enum MovedValueUseKind {
|
pub enum MovedValueUseKind {
|
||||||
MovedInUse,
|
MovedInUse,
|
||||||
MovedInCapture,
|
MovedInCapture,
|
||||||
|
|
|
@ -76,7 +76,7 @@ pub struct FlowedMoveData<'a, 'tcx: 'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Index into `MoveData.paths`, used like a pointer
|
/// 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);
|
pub struct MovePathIndex(uint);
|
||||||
|
|
||||||
impl MovePathIndex {
|
impl MovePathIndex {
|
||||||
|
@ -128,7 +128,7 @@ pub struct MovePath<'tcx> {
|
||||||
pub next_sibling: MovePathIndex,
|
pub next_sibling: MovePathIndex,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
pub enum MoveKind {
|
pub enum MoveKind {
|
||||||
Declared, // When declared, variables start out "moved".
|
Declared, // When declared, variables start out "moved".
|
||||||
MoveExpr, // Expression or binding that moves a variable
|
MoveExpr, // Expression or binding that moves a variable
|
||||||
|
|
|
@ -26,7 +26,7 @@ use rustc::middle::dataflow;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use std::borrow::IntoCow;
|
use std::borrow::IntoCow;
|
||||||
|
|
||||||
#[derive(Show, Copy)]
|
#[derive(Debug, Copy)]
|
||||||
pub enum Variant {
|
pub enum Variant {
|
||||||
Loans,
|
Loans,
|
||||||
Moves,
|
Moves,
|
||||||
|
|
|
@ -42,7 +42,7 @@ use std::old_io::{self, MemReader};
|
||||||
use std::option;
|
use std::option;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
pub enum PpSourceMode {
|
pub enum PpSourceMode {
|
||||||
PpmNormal,
|
PpmNormal,
|
||||||
PpmEveryBodyLoops,
|
PpmEveryBodyLoops,
|
||||||
|
@ -54,7 +54,7 @@ pub enum PpSourceMode {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
pub enum PpFlowGraphMode {
|
pub enum PpFlowGraphMode {
|
||||||
Default,
|
Default,
|
||||||
/// Drops the labels from the edges in the flowgraph output. This
|
/// Drops the labels from the edges in the flowgraph output. This
|
||||||
|
@ -63,7 +63,7 @@ pub enum PpFlowGraphMode {
|
||||||
/// have become a pain to maintain.
|
/// have become a pain to maintain.
|
||||||
UnlabelledEdges,
|
UnlabelledEdges,
|
||||||
}
|
}
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
pub enum PpMode {
|
pub enum PpMode {
|
||||||
PpmSource(PpSourceMode),
|
PpmSource(PpSourceMode),
|
||||||
PpmFlowGraph(PpFlowGraphMode),
|
PpmFlowGraph(PpFlowGraphMode),
|
||||||
|
@ -338,7 +338,7 @@ fn gather_flowgraph_variants(sess: &Session) -> Vec<borrowck_dot::Variant> {
|
||||||
variants
|
variants
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum UserIdentifiedItem {
|
pub enum UserIdentifiedItem {
|
||||||
ItemViaNode(ast::NodeId),
|
ItemViaNode(ast::NodeId),
|
||||||
ItemViaPath(Vec<String>),
|
ItemViaPath(Vec<String>),
|
||||||
|
|
|
@ -115,7 +115,7 @@ pub enum Linkage {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub enum DiagnosticSeverity {
|
pub enum DiagnosticSeverity {
|
||||||
Error,
|
Error,
|
||||||
Warning,
|
Warning,
|
||||||
|
@ -312,7 +312,7 @@ pub enum RealPredicate {
|
||||||
|
|
||||||
// The LLVM TypeKind type - must stay in sync with the def of
|
// The LLVM TypeKind type - must stay in sync with the def of
|
||||||
// LLVMTypeKind in llvm/include/llvm-c/Core.h
|
// LLVMTypeKind in llvm/include/llvm-c/Core.h
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub enum TypeKind {
|
pub enum TypeKind {
|
||||||
Void = 0,
|
Void = 0,
|
||||||
|
|
|
@ -127,7 +127,7 @@ enum PatternBindingMode {
|
||||||
ArgumentIrrefutableMode,
|
ArgumentIrrefutableMode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Eq, Hash, Show)]
|
#[derive(Copy, PartialEq, Eq, Hash, Debug)]
|
||||||
enum Namespace {
|
enum Namespace {
|
||||||
TypeNS,
|
TypeNS,
|
||||||
ValueNS
|
ValueNS
|
||||||
|
@ -193,7 +193,7 @@ impl<'a, 'v, 'tcx> Visitor<'v> for Resolver<'a, 'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Contains data for specific types of import directives.
|
/// Contains data for specific types of import directives.
|
||||||
#[derive(Copy,Show)]
|
#[derive(Copy,Debug)]
|
||||||
enum ImportDirectiveSubclass {
|
enum ImportDirectiveSubclass {
|
||||||
SingleImport(Name /* target */, Name /* source */),
|
SingleImport(Name /* target */, Name /* source */),
|
||||||
GlobImport
|
GlobImport
|
||||||
|
@ -242,7 +242,7 @@ enum TypeParameters<'a> {
|
||||||
|
|
||||||
// The rib kind controls the translation of local
|
// The rib kind controls the translation of local
|
||||||
// definitions (`DefLocal`) to upvars (`DefUpvar`).
|
// definitions (`DefLocal`) to upvars (`DefUpvar`).
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
enum RibKind {
|
enum RibKind {
|
||||||
// No translation needs to be applied.
|
// No translation needs to be applied.
|
||||||
NormalRibKind,
|
NormalRibKind,
|
||||||
|
@ -266,7 +266,7 @@ enum RibKind {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Methods can be required or provided. RequiredMethod methods only occur in traits.
|
// Methods can be required or provided. RequiredMethod methods only occur in traits.
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
enum MethodSort {
|
enum MethodSort {
|
||||||
RequiredMethod,
|
RequiredMethod,
|
||||||
ProvidedMethod(NodeId)
|
ProvidedMethod(NodeId)
|
||||||
|
@ -301,7 +301,7 @@ enum BareIdentifierPatternResolution {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// One local scope.
|
/// One local scope.
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
struct Rib {
|
struct Rib {
|
||||||
bindings: HashMap<Name, DefLike>,
|
bindings: HashMap<Name, DefLike>,
|
||||||
kind: RibKind,
|
kind: RibKind,
|
||||||
|
@ -317,14 +317,14 @@ impl Rib {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether an import can be shadowed by another import.
|
/// Whether an import can be shadowed by another import.
|
||||||
#[derive(Show,PartialEq,Clone,Copy)]
|
#[derive(Debug,PartialEq,Clone,Copy)]
|
||||||
enum Shadowable {
|
enum Shadowable {
|
||||||
Always,
|
Always,
|
||||||
Never
|
Never
|
||||||
}
|
}
|
||||||
|
|
||||||
/// One import directive.
|
/// One import directive.
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
struct ImportDirective {
|
struct ImportDirective {
|
||||||
module_path: Vec<Name>,
|
module_path: Vec<Name>,
|
||||||
subclass: ImportDirectiveSubclass,
|
subclass: ImportDirectiveSubclass,
|
||||||
|
@ -354,7 +354,7 @@ impl ImportDirective {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The item that an import resolves to.
|
/// The item that an import resolves to.
|
||||||
#[derive(Clone,Show)]
|
#[derive(Clone,Debug)]
|
||||||
struct Target {
|
struct Target {
|
||||||
target_module: Rc<Module>,
|
target_module: Rc<Module>,
|
||||||
bindings: Rc<NameBindings>,
|
bindings: Rc<NameBindings>,
|
||||||
|
@ -375,7 +375,7 @@ impl Target {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An ImportResolution represents a particular `use` directive.
|
/// An ImportResolution represents a particular `use` directive.
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
struct ImportResolution {
|
struct ImportResolution {
|
||||||
/// Whether this resolution came from a `use` or a `pub use`. Note that this
|
/// 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
|
/// 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.
|
/// The link from a module up to its nearest parent node.
|
||||||
#[derive(Clone,Show)]
|
#[derive(Clone,Debug)]
|
||||||
enum ParentLink {
|
enum ParentLink {
|
||||||
NoParentLink,
|
NoParentLink,
|
||||||
ModuleParentLink(Weak<Module>, Name),
|
ModuleParentLink(Weak<Module>, Name),
|
||||||
|
@ -463,7 +463,7 @@ enum ParentLink {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The type of module this is.
|
/// The type of module this is.
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
enum ModuleKind {
|
enum ModuleKind {
|
||||||
NormalModuleKind,
|
NormalModuleKind,
|
||||||
TraitModuleKind,
|
TraitModuleKind,
|
||||||
|
@ -556,7 +556,7 @@ impl fmt::Debug for Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
flags DefModifiers: u8 {
|
flags DefModifiers: u8 {
|
||||||
const PUBLIC = 0b0000_0001,
|
const PUBLIC = 0b0000_0001,
|
||||||
const IMPORTABLE = 0b0000_0010,
|
const IMPORTABLE = 0b0000_0010,
|
||||||
|
@ -564,7 +564,7 @@ bitflags! {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Records a possibly-private type definition.
|
// Records a possibly-private type definition.
|
||||||
#[derive(Clone,Show)]
|
#[derive(Clone,Debug)]
|
||||||
struct TypeNsDef {
|
struct TypeNsDef {
|
||||||
modifiers: DefModifiers, // see note in ImportResolution about how to use this
|
modifiers: DefModifiers, // see note in ImportResolution about how to use this
|
||||||
module_def: Option<Rc<Module>>,
|
module_def: Option<Rc<Module>>,
|
||||||
|
@ -573,7 +573,7 @@ struct TypeNsDef {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Records a possibly-private value definition.
|
// Records a possibly-private value definition.
|
||||||
#[derive(Clone, Copy, Show)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
struct ValueNsDef {
|
struct ValueNsDef {
|
||||||
modifiers: DefModifiers, // see note in ImportResolution about how to use this
|
modifiers: DefModifiers, // see note in ImportResolution about how to use this
|
||||||
def: Def,
|
def: Def,
|
||||||
|
@ -582,7 +582,7 @@ struct ValueNsDef {
|
||||||
|
|
||||||
// Records the definitions (at most one for each namespace) that a name is
|
// Records the definitions (at most one for each namespace) that a name is
|
||||||
// bound to.
|
// bound to.
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
struct NameBindings {
|
struct NameBindings {
|
||||||
type_def: RefCell<Option<TypeNsDef>>, //< Meaning in type namespace.
|
type_def: RefCell<Option<TypeNsDef>>, //< Meaning in type namespace.
|
||||||
value_def: RefCell<Option<ValueNsDef>>, //< Meaning in value 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 {
|
pub enum Row {
|
||||||
Variable,
|
Variable,
|
||||||
Enum,
|
Enum,
|
||||||
|
|
|
@ -227,7 +227,7 @@ use syntax::codemap::Span;
|
||||||
use syntax::fold::Folder;
|
use syntax::fold::Folder;
|
||||||
use syntax::ptr::P;
|
use syntax::ptr::P;
|
||||||
|
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
struct ConstantExpr<'a>(&'a ast::Expr);
|
struct ConstantExpr<'a>(&'a ast::Expr);
|
||||||
|
|
||||||
impl<'a> ConstantExpr<'a> {
|
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)
|
// An option identifying a branch (either a literal, an enum variant or a range)
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
enum Opt<'a, 'tcx> {
|
enum Opt<'a, 'tcx> {
|
||||||
ConstantValue(ConstantExpr<'a>),
|
ConstantValue(ConstantExpr<'a>),
|
||||||
ConstantRange(ConstantExpr<'a>, ConstantExpr<'a>),
|
ConstantRange(ConstantExpr<'a>, ConstantExpr<'a>),
|
||||||
|
|
|
@ -72,7 +72,7 @@ use util::ppaux::ty_to_string;
|
||||||
type Hint = attr::ReprAttr;
|
type Hint = attr::ReprAttr;
|
||||||
|
|
||||||
/// Representations.
|
/// Representations.
|
||||||
#[derive(Eq, PartialEq, Show)]
|
#[derive(Eq, PartialEq, Debug)]
|
||||||
pub enum Repr<'tcx> {
|
pub enum Repr<'tcx> {
|
||||||
/// C-like enums; basically an int.
|
/// C-like enums; basically an int.
|
||||||
CEnum(IntType, Disr, Disr), // discriminant range (signedness based on the IntType)
|
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.
|
/// For structs, and struct-like parts of anything fancier.
|
||||||
#[derive(Eq, PartialEq, Show)]
|
#[derive(Eq, PartialEq, Debug)]
|
||||||
pub struct Struct<'tcx> {
|
pub struct Struct<'tcx> {
|
||||||
// If the struct is DST, then the size and alignment do not take into
|
// If the struct is DST, then the size and alignment do not take into
|
||||||
// account the unsized fields of the struct.
|
// 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 {
|
struct IntBounds {
|
||||||
slo: i64,
|
slo: i64,
|
||||||
shi: i64,
|
shi: i64,
|
||||||
|
|
|
@ -50,7 +50,7 @@ pub struct CleanupScope<'blk, 'tcx: 'blk> {
|
||||||
cached_landing_pad: Option<BasicBlockRef>,
|
cached_landing_pad: Option<BasicBlockRef>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub struct CustomScopeIndex {
|
pub struct CustomScopeIndex {
|
||||||
index: uint
|
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 {
|
pub enum EarlyExitLabel {
|
||||||
UnwindExit,
|
UnwindExit,
|
||||||
ReturnExit,
|
ReturnExit,
|
||||||
|
@ -106,7 +106,7 @@ pub trait Cleanup<'tcx> {
|
||||||
|
|
||||||
pub type CleanupObj<'tcx> = Box<Cleanup<'tcx>+'tcx>;
|
pub type CleanupObj<'tcx> = Box<Cleanup<'tcx>+'tcx>;
|
||||||
|
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub enum ScopeId {
|
pub enum ScopeId {
|
||||||
AstScope(ast::NodeId),
|
AstScope(ast::NodeId),
|
||||||
CustomScope(CustomScopeIndex)
|
CustomScope(CustomScopeIndex)
|
||||||
|
@ -911,7 +911,7 @@ impl<'tcx> Cleanup<'tcx> for DropValue<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub enum Heap {
|
pub enum Heap {
|
||||||
HeapExchange
|
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.
|
// Key used to lookup values supplied for type parameters in an expr.
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
pub enum ExprOrMethodCall {
|
pub enum ExprOrMethodCall {
|
||||||
// Type parameters for a path like `None::<int>`
|
// Type parameters for a path like `None::<int>`
|
||||||
ExprId(ast::NodeId),
|
ExprId(ast::NodeId),
|
||||||
|
|
|
@ -52,7 +52,7 @@ pub struct DatumBlock<'blk, 'tcx: 'blk, K> {
|
||||||
pub datum: Datum<'tcx, K>,
|
pub datum: Datum<'tcx, K>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
pub enum Expr {
|
pub enum Expr {
|
||||||
/// a fresh value that was produced and which has no cleanup yet
|
/// a fresh value that was produced and which has no cleanup yet
|
||||||
/// because it has not yet "landed" into its permanent home
|
/// because it has not yet "landed" into its permanent home
|
||||||
|
@ -64,10 +64,10 @@ pub enum Expr {
|
||||||
LvalueExpr,
|
LvalueExpr,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Show)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
pub struct Lvalue;
|
pub struct Lvalue;
|
||||||
|
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
pub struct Rvalue {
|
pub struct Rvalue {
|
||||||
pub mode: RvalueMode
|
pub mode: RvalueMode
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ impl Drop for Rvalue {
|
||||||
fn drop(&mut self) { }
|
fn drop(&mut self) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Eq, Hash, Show)]
|
#[derive(Copy, PartialEq, Eq, Hash, Debug)]
|
||||||
pub enum RvalueMode {
|
pub enum RvalueMode {
|
||||||
/// `val` is a pointer to the actual value (and thus has type *T)
|
/// `val` is a pointer to the actual value (and thus has type *T)
|
||||||
ByRef,
|
ByRef,
|
||||||
|
|
|
@ -249,7 +249,7 @@ const FLAGS_NONE: c_uint = 0;
|
||||||
// Public Interface of debuginfo module
|
// Public Interface of debuginfo module
|
||||||
//=-----------------------------------------------------------------------------
|
//=-----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Copy, Show, Hash, Eq, PartialEq, Clone)]
|
#[derive(Copy, Debug, Hash, Eq, PartialEq, Clone)]
|
||||||
struct UniqueTypeId(ast::Name);
|
struct UniqueTypeId(ast::Name);
|
||||||
|
|
||||||
// The TypeMap is where the CrateDebugContext holds the type metadata nodes
|
// The TypeMap is where the CrateDebugContext holds the type metadata nodes
|
||||||
|
|
|
@ -1924,7 +1924,7 @@ fn float_cast(bcx: Block,
|
||||||
} else { llsrc };
|
} else { llsrc };
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
pub enum cast_kind {
|
pub enum cast_kind {
|
||||||
cast_pointer,
|
cast_pointer,
|
||||||
cast_integral,
|
cast_integral,
|
||||||
|
|
|
@ -286,7 +286,7 @@ pub fn monomorphic_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
|
||||||
(lldecl, mono_ty, true)
|
(lldecl, mono_ty, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Eq, Hash, Show)]
|
#[derive(PartialEq, Eq, Hash, Debug)]
|
||||||
pub struct MonoId<'tcx> {
|
pub struct MonoId<'tcx> {
|
||||||
pub def: ast::DefId,
|
pub def: ast::DefId,
|
||||||
pub params: subst::VecPerParamSpace<Ty<'tcx>>
|
pub params: subst::VecPerParamSpace<Ty<'tcx>>
|
||||||
|
|
|
@ -27,7 +27,7 @@ use std::iter::repeat;
|
||||||
|
|
||||||
use libc::c_uint;
|
use libc::c_uint;
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Show)]
|
#[derive(Clone, Copy, PartialEq, Debug)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct Type {
|
pub struct Type {
|
||||||
rf: TypeRef
|
rf: TypeRef
|
||||||
|
|
|
@ -73,7 +73,7 @@ pub struct Pick<'tcx> {
|
||||||
pub kind: PickKind<'tcx>,
|
pub kind: PickKind<'tcx>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone,Show)]
|
#[derive(Clone,Debug)]
|
||||||
pub enum PickKind<'tcx> {
|
pub enum PickKind<'tcx> {
|
||||||
InherentImplPick(/* Impl */ ast::DefId),
|
InherentImplPick(/* Impl */ ast::DefId),
|
||||||
ObjectPick(/* Trait */ ast::DefId, /* method_num */ uint, /* real_index */ uint),
|
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
|
// difference is that it doesn't embed any regions or other
|
||||||
// specifics. The "confirmation" step recreates those details as
|
// specifics. The "confirmation" step recreates those details as
|
||||||
// needed.
|
// needed.
|
||||||
#[derive(Clone,Show)]
|
#[derive(Clone,Debug)]
|
||||||
pub enum PickAdjustment {
|
pub enum PickAdjustment {
|
||||||
// Indicates that the source expression should be autoderef'd N times
|
// 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 {
|
pub enum LvaluePreference {
|
||||||
PreferMutLvalue,
|
PreferMutLvalue,
|
||||||
NoPreference
|
NoPreference
|
||||||
|
|
|
@ -230,7 +230,7 @@ pub fn infer_variance(tcx: &ty::ctxt) {
|
||||||
|
|
||||||
type VarianceTermPtr<'a> = &'a VarianceTerm<'a>;
|
type VarianceTermPtr<'a> = &'a VarianceTerm<'a>;
|
||||||
|
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
struct InferredIndex(uint);
|
struct InferredIndex(uint);
|
||||||
|
|
||||||
#[derive(Copy)]
|
#[derive(Copy)]
|
||||||
|
@ -266,7 +266,7 @@ struct TermsContext<'a, 'tcx: 'a> {
|
||||||
inferred_infos: Vec<InferredInfo<'a>> ,
|
inferred_infos: Vec<InferredInfo<'a>> ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Show, PartialEq)]
|
#[derive(Copy, Debug, PartialEq)]
|
||||||
enum ParamKind {
|
enum ParamKind {
|
||||||
TypeParam,
|
TypeParam,
|
||||||
RegionParam
|
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 struct Crate {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub src: FsPath,
|
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 struct ExternalCrate {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub attrs: Vec<Attribute>,
|
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
|
/// Anything with a source location and set of attributes and, optionally, a
|
||||||
/// name. That is, anything that can be documented. This doesn't correspond
|
/// 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.
|
/// 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 {
|
pub struct Item {
|
||||||
/// Stringified span
|
/// Stringified span
|
||||||
pub source: Span,
|
pub source: Span,
|
||||||
|
@ -313,7 +313,7 @@ impl Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
|
||||||
pub enum ItemEnum {
|
pub enum ItemEnum {
|
||||||
ExternCrateItem(String, Option<String>),
|
ExternCrateItem(String, Option<String>),
|
||||||
ImportItem(Import),
|
ImportItem(Import),
|
||||||
|
@ -342,7 +342,7 @@ pub enum ItemEnum {
|
||||||
AssociatedTypeItem(TyParam),
|
AssociatedTypeItem(TyParam),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
|
||||||
pub struct Module {
|
pub struct Module {
|
||||||
pub items: Vec<Item>,
|
pub items: Vec<Item>,
|
||||||
pub is_crate: bool,
|
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 {
|
pub enum Attribute {
|
||||||
Word(String),
|
Word(String),
|
||||||
List(String, Vec<Attribute> ),
|
List(String, Vec<Attribute> ),
|
||||||
|
@ -456,7 +456,7 @@ impl<'a> attr::AttrMetaMethods for &'a Attribute {
|
||||||
fn span(&self) -> codemap::Span { unimplemented!() }
|
fn span(&self) -> codemap::Span { unimplemented!() }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
|
||||||
pub struct TyParam {
|
pub struct TyParam {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub did: ast::DefId,
|
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 {
|
pub enum TyParamBound {
|
||||||
RegionBound(Lifetime),
|
RegionBound(Lifetime),
|
||||||
TraitBound(PolyTrait, ast::TraitBoundModifier)
|
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);
|
pub struct Lifetime(String);
|
||||||
|
|
||||||
impl Lifetime {
|
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 {
|
pub enum WherePredicate {
|
||||||
BoundPredicate { ty: Type, bounds: Vec<TyParamBound> },
|
BoundPredicate { ty: Type, bounds: Vec<TyParamBound> },
|
||||||
RegionPredicate { lifetime: Lifetime, bounds: Vec<Lifetime>},
|
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]?
|
// maybe use a Generic enum and use ~[Generic]?
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
|
||||||
pub struct Generics {
|
pub struct Generics {
|
||||||
pub lifetimes: Vec<Lifetime>,
|
pub lifetimes: Vec<Lifetime>,
|
||||||
pub type_params: Vec<TyParam>,
|
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 struct Method {
|
||||||
pub generics: Generics,
|
pub generics: Generics,
|
||||||
pub self_: SelfTy,
|
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 struct TyMethod {
|
||||||
pub unsafety: ast::Unsafety,
|
pub unsafety: ast::Unsafety,
|
||||||
pub decl: FnDecl,
|
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 {
|
pub enum SelfTy {
|
||||||
SelfStatic,
|
SelfStatic,
|
||||||
SelfValue,
|
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 struct Function {
|
||||||
pub decl: FnDecl,
|
pub decl: FnDecl,
|
||||||
pub generics: Generics,
|
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 struct FnDecl {
|
||||||
pub inputs: Arguments,
|
pub inputs: Arguments,
|
||||||
pub output: FunctionRetTy,
|
pub output: FunctionRetTy,
|
||||||
pub attrs: Vec<Attribute>,
|
pub attrs: Vec<Attribute>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
|
||||||
pub struct Arguments {
|
pub struct Arguments {
|
||||||
pub values: Vec<Argument>,
|
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 struct Argument {
|
||||||
pub type_: Type,
|
pub type_: Type,
|
||||||
pub name: String,
|
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 {
|
pub enum FunctionRetTy {
|
||||||
Return(Type),
|
Return(Type),
|
||||||
DefaultReturn,
|
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 struct Trait {
|
||||||
pub unsafety: ast::Unsafety,
|
pub unsafety: ast::Unsafety,
|
||||||
pub items: Vec<TraitMethod>,
|
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
|
/// 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.
|
/// TraitItem except that's already taken by an exported enum variant.
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
|
||||||
pub enum TraitMethod {
|
pub enum TraitMethod {
|
||||||
RequiredMethod(Item),
|
RequiredMethod(Item),
|
||||||
ProvidedMethod(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 {
|
pub enum ImplMethod {
|
||||||
MethodImplItem(Item),
|
MethodImplItem(Item),
|
||||||
TypeImplItem(Item),
|
TypeImplItem(Item),
|
||||||
|
@ -1317,7 +1317,7 @@ impl<'tcx> Clean<Item> for ty::ImplOrTraitItem<'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A trait reference, which may have higher ranked lifetimes.
|
/// 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 struct PolyTrait {
|
||||||
pub trait_: Type,
|
pub trait_: Type,
|
||||||
pub lifetimes: Vec<Lifetime>
|
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
|
/// 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
|
/// 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.
|
/// it does not preserve mutability or boxes.
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
|
||||||
pub enum Type {
|
pub enum Type {
|
||||||
/// structs/enums/traits (anything that'd be an ast::TyPath)
|
/// structs/enums/traits (anything that'd be an ast::TyPath)
|
||||||
ResolvedPath {
|
ResolvedPath {
|
||||||
|
@ -1370,7 +1370,7 @@ pub enum Type {
|
||||||
PolyTraitRef(Vec<TyParamBound>),
|
PolyTraitRef(Vec<TyParamBound>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Copy, Show)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Copy, Debug)]
|
||||||
pub enum PrimitiveType {
|
pub enum PrimitiveType {
|
||||||
Isize, I8, I16, I32, I64,
|
Isize, I8, I16, I32, I64,
|
||||||
Usize, U8, U16, U32, U64,
|
Usize, U8, U16, U32, U64,
|
||||||
|
@ -1382,7 +1382,7 @@ pub enum PrimitiveType {
|
||||||
PrimitiveTuple,
|
PrimitiveTuple,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, Copy, Show)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, Copy, Debug)]
|
||||||
pub enum TypeKind {
|
pub enum TypeKind {
|
||||||
TypeEnum,
|
TypeEnum,
|
||||||
TypeFunction,
|
TypeFunction,
|
||||||
|
@ -1625,7 +1625,7 @@ impl Clean<Type> for ast::QPath {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
|
||||||
pub enum StructField {
|
pub enum StructField {
|
||||||
HiddenStructField, // inserted later by strip passes
|
HiddenStructField, // inserted later by strip passes
|
||||||
TypedStructField(Type),
|
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 Struct {
|
||||||
pub struct_type: doctree::StructType,
|
pub struct_type: doctree::StructType,
|
||||||
pub generics: Generics,
|
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
|
/// This is a more limited form of the standard Struct, different in that
|
||||||
/// it lacks the things most items have (name, id, parameterization). Found
|
/// it lacks the things most items have (name, id, parameterization). Found
|
||||||
/// only as a variant in an enum.
|
/// only as a variant in an enum.
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
|
||||||
pub struct VariantStruct {
|
pub struct VariantStruct {
|
||||||
pub struct_type: doctree::StructType,
|
pub struct_type: doctree::StructType,
|
||||||
pub fields: Vec<Item>,
|
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 struct Enum {
|
||||||
pub variants: Vec<Item>,
|
pub variants: Vec<Item>,
|
||||||
pub generics: Generics,
|
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 struct Variant {
|
||||||
pub kind: VariantKind,
|
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 {
|
pub enum VariantKind {
|
||||||
CLikeVariant,
|
CLikeVariant,
|
||||||
TupleVariant(Vec<Type>),
|
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 struct Span {
|
||||||
pub filename: String,
|
pub filename: String,
|
||||||
pub loline: uint,
|
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 struct Path {
|
||||||
pub global: bool,
|
pub global: bool,
|
||||||
pub segments: Vec<PathSegment>,
|
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 {
|
pub enum PathParameters {
|
||||||
AngleBracketed {
|
AngleBracketed {
|
||||||
lifetimes: Vec<Lifetime>,
|
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 struct PathSegment {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub params: PathParameters
|
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 struct Typedef {
|
||||||
pub type_: Type,
|
pub type_: Type,
|
||||||
pub generics: Generics,
|
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 struct BareFunctionDecl {
|
||||||
pub unsafety: ast::Unsafety,
|
pub unsafety: ast::Unsafety,
|
||||||
pub generics: Generics,
|
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 struct Static {
|
||||||
pub type_: Type,
|
pub type_: Type,
|
||||||
pub mutability: Mutability,
|
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 struct Constant {
|
||||||
pub type_: Type,
|
pub type_: Type,
|
||||||
pub expr: String,
|
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 {
|
pub enum Mutability {
|
||||||
Mutable,
|
Mutable,
|
||||||
Immutable,
|
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 {
|
pub enum ImplPolarity {
|
||||||
Positive,
|
Positive,
|
||||||
Negative,
|
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 struct Impl {
|
||||||
pub generics: Generics,
|
pub generics: Generics,
|
||||||
pub trait_: Option<Type>,
|
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 {
|
pub enum Import {
|
||||||
// use source as str;
|
// use source as str;
|
||||||
SimpleImport(String, ImportSource),
|
SimpleImport(String, ImportSource),
|
||||||
|
@ -2229,13 +2229,13 @@ pub enum Import {
|
||||||
ImportList(ImportSource, Vec<ViewListIdent>),
|
ImportList(ImportSource, Vec<ViewListIdent>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
|
||||||
pub struct ImportSource {
|
pub struct ImportSource {
|
||||||
pub path: Path,
|
pub path: Path,
|
||||||
pub did: Option<ast::DefId>,
|
pub did: Option<ast::DefId>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
|
||||||
pub struct ViewListIdent {
|
pub struct ViewListIdent {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub source: Option<ast::DefId>,
|
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 struct Macro {
|
||||||
pub source: String,
|
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 struct Stability {
|
||||||
pub level: attr::StabilityLevel,
|
pub level: attr::StabilityLevel,
|
||||||
pub feature: String,
|
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>`
|
/// 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 struct TypeBinding {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub ty: Type
|
pub ty: Type
|
||||||
|
|
|
@ -72,7 +72,7 @@ impl Module {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Show, Clone, RustcEncodable, RustcDecodable, Copy)]
|
#[derive(Debug, Clone, RustcEncodable, RustcDecodable, Copy)]
|
||||||
pub enum StructType {
|
pub enum StructType {
|
||||||
/// A normal struct
|
/// A normal struct
|
||||||
Plain,
|
Plain,
|
||||||
|
@ -145,7 +145,7 @@ pub struct Typedef {
|
||||||
pub stab: Option<attr::Stability>,
|
pub stab: Option<attr::Stability>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
pub struct Static {
|
pub struct Static {
|
||||||
pub type_: P<ast::Ty>,
|
pub type_: P<ast::Ty>,
|
||||||
pub mutability: ast::Mutability,
|
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 {
|
struct LangString {
|
||||||
should_fail: bool,
|
should_fail: bool,
|
||||||
no_run: bool,
|
no_run: bool,
|
||||||
|
|
|
@ -61,7 +61,7 @@ pub trait FromHex {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Errors that can occur when decoding a hex encoded string
|
/// Errors that can occur when decoding a hex encoded string
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub enum FromHexError {
|
pub enum FromHexError {
|
||||||
/// The input contained a character not part of the hex format
|
/// The input contained a character not part of the hex format
|
||||||
InvalidHexCharacter(char, uint),
|
InvalidHexCharacter(char, uint),
|
||||||
|
|
|
@ -214,7 +214,7 @@ use unicode::str::Utf16Item;
|
||||||
use Encodable;
|
use Encodable;
|
||||||
|
|
||||||
/// Represents a json value
|
/// Represents a json value
|
||||||
#[derive(Clone, PartialEq, PartialOrd, Show)]
|
#[derive(Clone, PartialEq, PartialOrd, Debug)]
|
||||||
pub enum Json {
|
pub enum Json {
|
||||||
I64(i64),
|
I64(i64),
|
||||||
U64(u64),
|
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> }
|
pub struct AsPrettyJson<'a, T: 'a> { inner: &'a T, indent: Option<uint> }
|
||||||
|
|
||||||
/// The errors that can arise while parsing a JSON stream.
|
/// The errors that can arise while parsing a JSON stream.
|
||||||
#[derive(Clone, Copy, PartialEq, Show)]
|
#[derive(Clone, Copy, PartialEq, Debug)]
|
||||||
pub enum ErrorCode {
|
pub enum ErrorCode {
|
||||||
InvalidSyntax,
|
InvalidSyntax,
|
||||||
InvalidNumber,
|
InvalidNumber,
|
||||||
|
@ -256,7 +256,7 @@ pub enum ErrorCode {
|
||||||
NotUtf8,
|
NotUtf8,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Show)]
|
#[derive(Clone, Copy, PartialEq, Debug)]
|
||||||
pub enum ParserError {
|
pub enum ParserError {
|
||||||
/// msg, line, col
|
/// msg, line, col
|
||||||
SyntaxError(ErrorCode, uint, uint),
|
SyntaxError(ErrorCode, uint, uint),
|
||||||
|
@ -266,7 +266,7 @@ pub enum ParserError {
|
||||||
// Builder and Parser have the same errors.
|
// Builder and Parser have the same errors.
|
||||||
pub type BuilderError = ParserError;
|
pub type BuilderError = ParserError;
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Show)]
|
#[derive(Clone, PartialEq, Debug)]
|
||||||
pub enum DecoderError {
|
pub enum DecoderError {
|
||||||
ParseError(ParserError),
|
ParseError(ParserError),
|
||||||
ExpectedError(string::String, string::String),
|
ExpectedError(string::String, string::String),
|
||||||
|
@ -275,7 +275,7 @@ pub enum DecoderError {
|
||||||
ApplicationError(string::String)
|
ApplicationError(string::String)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub enum EncoderError {
|
pub enum EncoderError {
|
||||||
FmtError(fmt::Error),
|
FmtError(fmt::Error),
|
||||||
BadHashmapKey,
|
BadHashmapKey,
|
||||||
|
@ -1239,7 +1239,7 @@ impl Index<uint> for Json {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The output of the streaming parser.
|
/// The output of the streaming parser.
|
||||||
#[derive(PartialEq, Clone, Show)]
|
#[derive(PartialEq, Clone, Debug)]
|
||||||
pub enum JsonEvent {
|
pub enum JsonEvent {
|
||||||
ObjectStart,
|
ObjectStart,
|
||||||
ObjectEnd,
|
ObjectEnd,
|
||||||
|
@ -1254,7 +1254,7 @@ pub enum JsonEvent {
|
||||||
Error(ParserError),
|
Error(ParserError),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Show)]
|
#[derive(PartialEq, Debug)]
|
||||||
enum ParserState {
|
enum ParserState {
|
||||||
// Parse a value in an array, true means first element.
|
// Parse a value in an array, true means first element.
|
||||||
ParseArray(bool),
|
ParseArray(bool),
|
||||||
|
@ -1284,7 +1284,7 @@ pub struct Stack {
|
||||||
/// For example, StackElement::Key("foo"), StackElement::Key("bar"),
|
/// For example, StackElement::Key("foo"), StackElement::Key("bar"),
|
||||||
/// StackElement::Index(3) and StackElement::Key("x") are the
|
/// StackElement::Index(3) and StackElement::Key("x") are the
|
||||||
/// StackElements compositing the stack that represents foo.bar[3].x
|
/// StackElements compositing the stack that represents foo.bar[3].x
|
||||||
#[derive(PartialEq, Clone, Show)]
|
#[derive(PartialEq, Clone, Debug)]
|
||||||
pub enum StackElement<'l> {
|
pub enum StackElement<'l> {
|
||||||
Index(u32),
|
Index(u32),
|
||||||
Key(&'l str),
|
Key(&'l str),
|
||||||
|
@ -1292,7 +1292,7 @@ pub enum StackElement<'l> {
|
||||||
|
|
||||||
// Internally, Key elements are stored as indices in a buffer to avoid
|
// Internally, Key elements are stored as indices in a buffer to avoid
|
||||||
// allocating a string for every member of an object.
|
// allocating a string for every member of an object.
|
||||||
#[derive(PartialEq, Clone, Show)]
|
#[derive(PartialEq, Clone, Debug)]
|
||||||
enum InternalStackElement {
|
enum InternalStackElement {
|
||||||
InternalIndex(u32),
|
InternalIndex(u32),
|
||||||
InternalKey(u16, u16), // start, size
|
InternalKey(u16, u16), // start, size
|
||||||
|
@ -2623,7 +2623,7 @@ mod tests {
|
||||||
use std::num::Float;
|
use std::num::Float;
|
||||||
use std::string;
|
use std::string;
|
||||||
|
|
||||||
#[derive(RustcDecodable, Eq, PartialEq, Show)]
|
#[derive(RustcDecodable, Eq, PartialEq, Debug)]
|
||||||
struct OptionData {
|
struct OptionData {
|
||||||
opt: Option<uint>,
|
opt: Option<uint>,
|
||||||
}
|
}
|
||||||
|
@ -2650,20 +2650,20 @@ mod tests {
|
||||||
ExpectedError("Number".to_string(), "false".to_string()));
|
ExpectedError("Number".to_string(), "false".to_string()));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, RustcEncodable, RustcDecodable, Show)]
|
#[derive(PartialEq, RustcEncodable, RustcDecodable, Debug)]
|
||||||
enum Animal {
|
enum Animal {
|
||||||
Dog,
|
Dog,
|
||||||
Frog(string::String, int)
|
Frog(string::String, int)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, RustcEncodable, RustcDecodable, Show)]
|
#[derive(PartialEq, RustcEncodable, RustcDecodable, Debug)]
|
||||||
struct Inner {
|
struct Inner {
|
||||||
a: (),
|
a: (),
|
||||||
b: uint,
|
b: uint,
|
||||||
c: Vec<string::String>,
|
c: Vec<string::String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, RustcEncodable, RustcDecodable, Show)]
|
#[derive(PartialEq, RustcEncodable, RustcDecodable, Debug)]
|
||||||
struct Outer {
|
struct Outer {
|
||||||
inner: Vec<Inner>,
|
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_u64, u64 }
|
||||||
test_checked_next_power_of_two! { test_checked_next_power_of_two_uint, uint }
|
test_checked_next_power_of_two! { test_checked_next_power_of_two_uint, uint }
|
||||||
|
|
||||||
#[derive(PartialEq, Show)]
|
#[derive(PartialEq, Debug)]
|
||||||
struct Value { x: int }
|
struct Value { x: int }
|
||||||
|
|
||||||
impl ToPrimitive for Value {
|
impl ToPrimitive for Value {
|
||||||
|
|
|
@ -320,7 +320,7 @@ pub type IoResult<T> = Result<T, IoError>;
|
||||||
/// # FIXME
|
/// # FIXME
|
||||||
///
|
///
|
||||||
/// Is something like this sufficient? It's kind of archaic
|
/// Is something like this sufficient? It's kind of archaic
|
||||||
#[derive(PartialEq, Eq, Clone, Show)]
|
#[derive(PartialEq, Eq, Clone, Debug)]
|
||||||
pub struct IoError {
|
pub struct IoError {
|
||||||
/// An enumeration which can be matched against for determining the flavor
|
/// An enumeration which can be matched against for determining the flavor
|
||||||
/// of error.
|
/// of error.
|
||||||
|
@ -376,7 +376,7 @@ impl Error for IoError {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A list specifying general categories of I/O error.
|
/// A list specifying general categories of I/O error.
|
||||||
#[derive(Copy, PartialEq, Eq, Clone, Show)]
|
#[derive(Copy, PartialEq, Eq, Clone, Debug)]
|
||||||
pub enum IoErrorKind {
|
pub enum IoErrorKind {
|
||||||
/// Any I/O error not part of this list.
|
/// Any I/O error not part of this list.
|
||||||
OtherIoError,
|
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
|
/// 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
|
/// passed to `File::open_mode` and are used to control where the file is
|
||||||
/// positioned when it is initially opened.
|
/// positioned when it is initially opened.
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, Show)]
|
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||||
pub enum FileMode {
|
pub enum FileMode {
|
||||||
/// Opens a file positioned at the beginning.
|
/// Opens a file positioned at the beginning.
|
||||||
Open,
|
Open,
|
||||||
|
@ -1674,7 +1674,7 @@ pub enum FileMode {
|
||||||
|
|
||||||
/// Access permissions with which the file should be opened. `File`s
|
/// Access permissions with which the file should be opened. `File`s
|
||||||
/// opened with `Read` will return an error if written to.
|
/// 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 {
|
pub enum FileAccess {
|
||||||
/// Read-only access, requests to write will result in an error
|
/// Read-only access, requests to write will result in an error
|
||||||
Read,
|
Read,
|
||||||
|
@ -1685,7 +1685,7 @@ pub enum FileAccess {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Different kinds of files which can be identified by a call to stat
|
/// 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 {
|
pub enum FileType {
|
||||||
/// This is a normal file, corresponding to `S_IFREG`
|
/// This is a normal file, corresponding to `S_IFREG`
|
||||||
RegularFile,
|
RegularFile,
|
||||||
|
@ -1789,7 +1789,7 @@ pub struct UnstableFileStat {
|
||||||
bitflags! {
|
bitflags! {
|
||||||
/// A set of permissions for a file or directory is represented by a set of
|
/// A set of permissions for a file or directory is represented by a set of
|
||||||
/// flags which are or'd together.
|
/// flags which are or'd together.
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
flags FilePermission: u32 {
|
flags FilePermission: u32 {
|
||||||
const USER_READ = 0o400,
|
const USER_READ = 0o400,
|
||||||
const USER_WRITE = 0o200,
|
const USER_WRITE = 0o200,
|
||||||
|
@ -1845,7 +1845,7 @@ mod tests {
|
||||||
use prelude::v1::{Ok, Vec, Buffer, SliceExt};
|
use prelude::v1::{Ok, Vec, Buffer, SliceExt};
|
||||||
use uint;
|
use uint;
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Show)]
|
#[derive(Clone, PartialEq, Debug)]
|
||||||
enum BadReaderBehavior {
|
enum BadReaderBehavior {
|
||||||
GoodBehavior(uint),
|
GoodBehavior(uint),
|
||||||
BadBehavior(uint)
|
BadBehavior(uint)
|
||||||
|
|
|
@ -29,7 +29,7 @@ use sys;
|
||||||
use vec::Vec;
|
use vec::Vec;
|
||||||
|
|
||||||
/// Hints to the types of sockets that are desired when looking up hosts
|
/// Hints to the types of sockets that are desired when looking up hosts
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub enum SocketType {
|
pub enum SocketType {
|
||||||
Stream, Datagram, Raw
|
Stream, Datagram, Raw
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ pub enum SocketType {
|
||||||
/// to manipulate how a query is performed.
|
/// to manipulate how a query is performed.
|
||||||
///
|
///
|
||||||
/// The meaning of each of these flags can be found with `man -s 3 getaddrinfo`
|
/// The meaning of each of these flags can be found with `man -s 3 getaddrinfo`
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub enum Flag {
|
pub enum Flag {
|
||||||
AddrConfig,
|
AddrConfig,
|
||||||
All,
|
All,
|
||||||
|
@ -51,7 +51,7 @@ pub enum Flag {
|
||||||
|
|
||||||
/// A transport protocol associated with either a hint or a return value of
|
/// A transport protocol associated with either a hint or a return value of
|
||||||
/// `lookup`
|
/// `lookup`
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub enum Protocol {
|
pub enum Protocol {
|
||||||
TCP, UDP
|
TCP, UDP
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ pub enum Protocol {
|
||||||
///
|
///
|
||||||
/// For details on these fields, see their corresponding definitions via
|
/// For details on these fields, see their corresponding definitions via
|
||||||
/// `man -s 3 getaddrinfo`
|
/// `man -s 3 getaddrinfo`
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub struct Hint {
|
pub struct Hint {
|
||||||
pub family: uint,
|
pub family: uint,
|
||||||
pub socktype: Option<SocketType>,
|
pub socktype: Option<SocketType>,
|
||||||
|
@ -69,7 +69,7 @@ pub struct Hint {
|
||||||
pub flags: uint,
|
pub flags: uint,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub struct Info {
|
pub struct Info {
|
||||||
pub address: SocketAddr,
|
pub address: SocketAddr,
|
||||||
pub family: uint,
|
pub family: uint,
|
||||||
|
|
|
@ -32,7 +32,7 @@ use vec::Vec;
|
||||||
|
|
||||||
pub type Port = u16;
|
pub type Port = u16;
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Eq, Clone, Hash, Show)]
|
#[derive(Copy, PartialEq, Eq, Clone, Hash, Debug)]
|
||||||
pub enum IpAddr {
|
pub enum IpAddr {
|
||||||
Ipv4Addr(u8, u8, u8, u8),
|
Ipv4Addr(u8, u8, u8, u8),
|
||||||
Ipv6Addr(u16, u16, u16, u16, u16, u16, u16, u16)
|
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 struct SocketAddr {
|
||||||
pub ip: IpAddr,
|
pub ip: IpAddr,
|
||||||
pub port: Port,
|
pub port: Port,
|
||||||
|
|
|
@ -96,12 +96,12 @@ pub struct Process {
|
||||||
/// A representation of environment variable name
|
/// A representation of environment variable name
|
||||||
/// It compares case-insensitive on Windows and case-sensitive everywhere else.
|
/// It compares case-insensitive on Windows and case-sensitive everywhere else.
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
#[derive(Hash, PartialEq, Eq, Clone, Show)]
|
#[derive(Hash, PartialEq, Eq, Clone, Debug)]
|
||||||
struct EnvKey(CString);
|
struct EnvKey(CString);
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
#[derive(Eq, Clone, Show)]
|
#[derive(Eq, Clone, Debug)]
|
||||||
struct EnvKey(CString);
|
struct EnvKey(CString);
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
|
@ -492,7 +492,7 @@ pub enum StdioContainer {
|
||||||
|
|
||||||
/// Describes the result of a process after it has terminated.
|
/// Describes the result of a process after it has terminated.
|
||||||
/// Note that Windows have no signals, so the result is usually ExitStatus.
|
/// 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 {
|
pub enum ProcessExit {
|
||||||
/// Normal termination with an exit status.
|
/// Normal termination with an exit status.
|
||||||
ExitStatus(int),
|
ExitStatus(int),
|
||||||
|
|
|
@ -16,7 +16,7 @@ use old_io;
|
||||||
use slice::bytes::MutableByteVector;
|
use slice::bytes::MutableByteVector;
|
||||||
|
|
||||||
/// Wraps a `Reader`, limiting the number of bytes that can be read from it.
|
/// Wraps a `Reader`, limiting the number of bytes that can be read from it.
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
pub struct LimitReader<R> {
|
pub struct LimitReader<R> {
|
||||||
limit: uint,
|
limit: uint,
|
||||||
inner: R
|
inner: R
|
||||||
|
@ -78,7 +78,7 @@ impl<R: Buffer> Buffer for LimitReader<R> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A `Writer` which ignores bytes written to it, like /dev/null.
|
/// A `Writer` which ignores bytes written to it, like /dev/null.
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub struct NullWriter;
|
pub struct NullWriter;
|
||||||
|
|
||||||
impl Writer for 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.
|
/// A `Reader` which returns an infinite stream of 0 bytes, like /dev/zero.
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub struct ZeroReader;
|
pub struct ZeroReader;
|
||||||
|
|
||||||
impl Reader for ZeroReader {
|
impl Reader for ZeroReader {
|
||||||
|
@ -108,7 +108,7 @@ impl Buffer for ZeroReader {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A `Reader` which is always at EOF, like /dev/null.
|
/// A `Reader` which is always at EOF, like /dev/null.
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub struct NullReader;
|
pub struct NullReader;
|
||||||
|
|
||||||
impl Reader for 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,
|
/// 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.
|
/// that error is returned immediately and remaining `Writer`s are not called.
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
pub struct MultiWriter<W> {
|
pub struct MultiWriter<W> {
|
||||||
writers: Vec<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
|
/// A `Reader` which chains input from multiple `Reader`s, reading each to
|
||||||
/// completion before moving onto the next.
|
/// completion before moving onto the next.
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct ChainedReader<I, R> {
|
pub struct ChainedReader<I, R> {
|
||||||
readers: I,
|
readers: I,
|
||||||
cur_reader: Option<R>,
|
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 `Reader` which forwards input from another `Reader`, passing it along to
|
||||||
/// a `Writer` as well. Similar to the `tee(1)` command.
|
/// a `Writer` as well. Similar to the `tee(1)` command.
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
pub struct TeeReader<R, W> {
|
pub struct TeeReader<R, W> {
|
||||||
reader: R,
|
reader: R,
|
||||||
writer: W,
|
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`.
|
/// An adaptor converting an `Iterator<u8>` to a `Reader`.
|
||||||
#[derive(Clone, Show)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct IterReader<T> {
|
pub struct IterReader<T> {
|
||||||
iter: T,
|
iter: T,
|
||||||
}
|
}
|
||||||
|
|
|
@ -857,7 +857,7 @@ pub enum MapOption {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Possible errors when creating a map.
|
/// Possible errors when creating a map.
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub enum MapError {
|
pub enum MapError {
|
||||||
/// # The following are POSIX-specific
|
/// # The following are POSIX-specific
|
||||||
///
|
///
|
||||||
|
|
|
@ -959,7 +959,7 @@ pub fn is_sep_byte_verbatim(u: &u8) -> bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Prefix types for Path
|
/// Prefix types for Path
|
||||||
#[derive(Copy, PartialEq, Clone, Show)]
|
#[derive(Copy, PartialEq, Clone, Debug)]
|
||||||
pub enum PathPrefix {
|
pub enum PathPrefix {
|
||||||
/// Prefix `\\?\`, uint is the length of the following component
|
/// Prefix `\\?\`, uint is the length of the following component
|
||||||
VerbatimPrefix(uint),
|
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
|
/// The `recv` operation can only fail if the sending half of a channel is
|
||||||
/// disconnected, implying that no further messages will ever be received.
|
/// 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")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub struct RecvError;
|
pub struct RecvError;
|
||||||
|
|
||||||
/// This enumeration is the list of the possible reasons that try_recv could not
|
/// This enumeration is the list of the possible reasons that try_recv could not
|
||||||
/// return data when called.
|
/// return data when called.
|
||||||
#[derive(PartialEq, Clone, Copy, Show)]
|
#[derive(PartialEq, Clone, Copy, Debug)]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub enum TryRecvError {
|
pub enum TryRecvError {
|
||||||
/// This channel is currently empty, but the sender(s) have not yet
|
/// This channel is currently empty, but the sender(s) have not yet
|
||||||
|
|
|
@ -105,7 +105,7 @@ struct Buffer<T> {
|
||||||
size: uint,
|
size: uint,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
pub enum Failure {
|
pub enum Failure {
|
||||||
Empty,
|
Empty,
|
||||||
Disconnected,
|
Disconnected,
|
||||||
|
|
|
@ -32,7 +32,7 @@ use old_io;
|
||||||
|
|
||||||
// FIXME: move uses of Arc and deadline tracking to std::io
|
// FIXME: move uses of Arc and deadline tracking to std::io
|
||||||
|
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
pub enum SocketStatus {
|
pub enum SocketStatus {
|
||||||
Readable,
|
Readable,
|
||||||
Writable,
|
Writable,
|
||||||
|
|
|
@ -45,7 +45,7 @@ macro_rules! try_opt {
|
||||||
|
|
||||||
/// ISO 8601 time duration with nanosecond precision.
|
/// ISO 8601 time duration with nanosecond precision.
|
||||||
/// This also allows for the negative duration; see individual methods for details.
|
/// 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 {
|
pub struct Duration {
|
||||||
secs: i64,
|
secs: i64,
|
||||||
nanos: i32, // Always 0 <= nanos < NANOS_PER_SEC
|
nanos: i32, // Always 0 <= nanos < NANOS_PER_SEC
|
||||||
|
|
|
@ -15,7 +15,7 @@ pub use self::AbiArchitecture::*;
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
#[derive(Copy, PartialEq, Eq, Show)]
|
#[derive(Copy, PartialEq, Eq, Debug)]
|
||||||
pub enum Os {
|
pub enum Os {
|
||||||
OsWindows,
|
OsWindows,
|
||||||
OsMacos,
|
OsMacos,
|
||||||
|
@ -26,7 +26,7 @@ pub enum Os {
|
||||||
OsDragonfly,
|
OsDragonfly,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Clone, Copy, Show)]
|
#[derive(PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Clone, Copy, Debug)]
|
||||||
pub enum Abi {
|
pub enum Abi {
|
||||||
// NB: This ordering MUST match the AbiDatas array below.
|
// NB: This ordering MUST match the AbiDatas array below.
|
||||||
// (This is ensured by the test indices_are_correct().)
|
// (This is ensured by the test indices_are_correct().)
|
||||||
|
@ -47,7 +47,7 @@ pub enum Abi {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
#[derive(Copy, PartialEq, Show)]
|
#[derive(Copy, PartialEq, Debug)]
|
||||||
pub enum Architecture {
|
pub enum Architecture {
|
||||||
X86,
|
X86,
|
||||||
X86_64,
|
X86_64,
|
||||||
|
|
|
@ -208,14 +208,14 @@ impl Decodable for Ident {
|
||||||
pub type FnIdent = Option<Ident>;
|
pub type FnIdent = Option<Ident>;
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash,
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash,
|
||||||
Show, Copy)]
|
Debug, Copy)]
|
||||||
pub struct Lifetime {
|
pub struct Lifetime {
|
||||||
pub id: NodeId,
|
pub id: NodeId,
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
pub name: Name
|
pub name: Name
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub struct LifetimeDef {
|
pub struct LifetimeDef {
|
||||||
pub lifetime: Lifetime,
|
pub lifetime: Lifetime,
|
||||||
pub bounds: Vec<Lifetime>
|
pub bounds: Vec<Lifetime>
|
||||||
|
@ -224,7 +224,7 @@ pub struct LifetimeDef {
|
||||||
/// A "Path" is essentially Rust's notion of a name; for instance:
|
/// A "Path" is essentially Rust's notion of a name; for instance:
|
||||||
/// std::cmp::PartialEq . It's represented as a sequence of identifiers,
|
/// std::cmp::PartialEq . It's represented as a sequence of identifiers,
|
||||||
/// along with a bunch of supporting information.
|
/// 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 struct Path {
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
/// A `::foo` path, is relative to the crate root rather than current
|
/// 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
|
/// A segment of a path: an identifier, an optional lifetime, and a set of
|
||||||
/// types.
|
/// types.
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub struct PathSegment {
|
pub struct PathSegment {
|
||||||
/// The identifier portion of this path segment.
|
/// The identifier portion of this path segment.
|
||||||
pub identifier: Ident,
|
pub identifier: Ident,
|
||||||
|
@ -249,7 +249,7 @@ pub struct PathSegment {
|
||||||
pub parameters: PathParameters,
|
pub parameters: PathParameters,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub enum PathParameters {
|
pub enum PathParameters {
|
||||||
AngleBracketedParameters(AngleBracketedParameterData),
|
AngleBracketedParameters(AngleBracketedParameterData),
|
||||||
ParenthesizedParameters(ParenthesizedParameterData),
|
ParenthesizedParameters(ParenthesizedParameterData),
|
||||||
|
@ -327,7 +327,7 @@ impl PathParameters {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A path like `Foo<'a, T>`
|
/// 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 {
|
pub struct AngleBracketedParameterData {
|
||||||
/// The lifetime parameters for this path segment.
|
/// The lifetime parameters for this path segment.
|
||||||
pub lifetimes: Vec<Lifetime>,
|
pub lifetimes: Vec<Lifetime>,
|
||||||
|
@ -345,7 +345,7 @@ impl AngleBracketedParameterData {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A path like `Foo(A,B) -> C`
|
/// 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 {
|
pub struct ParenthesizedParameterData {
|
||||||
/// Overall span
|
/// Overall span
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
|
@ -362,7 +362,7 @@ pub type CrateNum = u32;
|
||||||
pub type NodeId = u32;
|
pub type NodeId = u32;
|
||||||
|
|
||||||
#[derive(Clone, Eq, Ord, PartialOrd, PartialEq, RustcEncodable,
|
#[derive(Clone, Eq, Ord, PartialOrd, PartialEq, RustcEncodable,
|
||||||
RustcDecodable, Hash, Show, Copy)]
|
RustcDecodable, Hash, Debug, Copy)]
|
||||||
pub struct DefId {
|
pub struct DefId {
|
||||||
pub krate: CrateNum,
|
pub krate: CrateNum,
|
||||||
pub node: NodeId,
|
pub node: NodeId,
|
||||||
|
@ -382,7 +382,7 @@ pub const DUMMY_NODE_ID: NodeId = -1;
|
||||||
/// typeck::collect::compute_bounds matches these against
|
/// typeck::collect::compute_bounds matches these against
|
||||||
/// the "special" built-in traits (see middle::lang_items) and
|
/// the "special" built-in traits (see middle::lang_items) and
|
||||||
/// detects Copy, Send and Sync.
|
/// detects Copy, Send and Sync.
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub enum TyParamBound {
|
pub enum TyParamBound {
|
||||||
TraitTyParamBound(PolyTraitRef, TraitBoundModifier),
|
TraitTyParamBound(PolyTraitRef, TraitBoundModifier),
|
||||||
RegionTyParamBound(Lifetime)
|
RegionTyParamBound(Lifetime)
|
||||||
|
@ -390,7 +390,7 @@ pub enum TyParamBound {
|
||||||
|
|
||||||
/// A modifier on a bound, currently this is only used for `?Sized`, where the
|
/// A modifier on a bound, currently this is only used for `?Sized`, where the
|
||||||
/// modifier is `Maybe`. Negative bounds should also be handled here.
|
/// 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 {
|
pub enum TraitBoundModifier {
|
||||||
None,
|
None,
|
||||||
Maybe,
|
Maybe,
|
||||||
|
@ -398,7 +398,7 @@ pub enum TraitBoundModifier {
|
||||||
|
|
||||||
pub type TyParamBounds = OwnedSlice<TyParamBound>;
|
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 struct TyParam {
|
||||||
pub ident: Ident,
|
pub ident: Ident,
|
||||||
pub id: NodeId,
|
pub id: NodeId,
|
||||||
|
@ -409,7 +409,7 @@ pub struct TyParam {
|
||||||
|
|
||||||
/// Represents lifetimes and type parameters attached to a declaration
|
/// Represents lifetimes and type parameters attached to a declaration
|
||||||
/// of a function, enum, trait, etc.
|
/// 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 struct Generics {
|
||||||
pub lifetimes: Vec<LifetimeDef>,
|
pub lifetimes: Vec<LifetimeDef>,
|
||||||
pub ty_params: OwnedSlice<TyParam>,
|
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 struct WhereClause {
|
||||||
pub id: NodeId,
|
pub id: NodeId,
|
||||||
pub predicates: Vec<WherePredicate>,
|
pub predicates: Vec<WherePredicate>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub enum WherePredicate {
|
pub enum WherePredicate {
|
||||||
BoundPredicate(WhereBoundPredicate),
|
BoundPredicate(WhereBoundPredicate),
|
||||||
RegionPredicate(WhereRegionPredicate),
|
RegionPredicate(WhereRegionPredicate),
|
||||||
EqPredicate(WhereEqPredicate)
|
EqPredicate(WhereEqPredicate)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub struct WhereBoundPredicate {
|
pub struct WhereBoundPredicate {
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
pub bounded_ty: P<Ty>,
|
pub bounded_ty: P<Ty>,
|
||||||
pub bounds: OwnedSlice<TyParamBound>,
|
pub bounds: OwnedSlice<TyParamBound>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub struct WhereRegionPredicate {
|
pub struct WhereRegionPredicate {
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
pub lifetime: Lifetime,
|
pub lifetime: Lifetime,
|
||||||
pub bounds: Vec<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 struct WhereEqPredicate {
|
||||||
pub id: NodeId,
|
pub id: NodeId,
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
|
@ -467,7 +467,7 @@ pub struct WhereEqPredicate {
|
||||||
/// used to drive conditional compilation
|
/// used to drive conditional compilation
|
||||||
pub type CrateConfig = Vec<P<MetaItem>> ;
|
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 struct Crate {
|
||||||
pub module: Mod,
|
pub module: Mod,
|
||||||
pub attrs: Vec<Attribute>,
|
pub attrs: Vec<Attribute>,
|
||||||
|
@ -478,7 +478,7 @@ pub struct Crate {
|
||||||
|
|
||||||
pub type MetaItem = Spanned<MetaItem_>;
|
pub type MetaItem = Spanned<MetaItem_>;
|
||||||
|
|
||||||
#[derive(Clone, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub enum MetaItem_ {
|
pub enum MetaItem_ {
|
||||||
MetaWord(InternedString),
|
MetaWord(InternedString),
|
||||||
MetaList(InternedString, Vec<P<MetaItem>>),
|
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 struct Block {
|
||||||
pub stmts: Vec<P<Stmt>>,
|
pub stmts: Vec<P<Stmt>>,
|
||||||
pub expr: Option<P<Expr>>,
|
pub expr: Option<P<Expr>>,
|
||||||
|
@ -519,27 +519,27 @@ pub struct Block {
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub struct Pat {
|
pub struct Pat {
|
||||||
pub id: NodeId,
|
pub id: NodeId,
|
||||||
pub node: Pat_,
|
pub node: Pat_,
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub struct FieldPat {
|
pub struct FieldPat {
|
||||||
pub ident: Ident,
|
pub ident: Ident,
|
||||||
pub pat: P<Pat>,
|
pub pat: P<Pat>,
|
||||||
pub is_shorthand: bool,
|
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 {
|
pub enum BindingMode {
|
||||||
BindByRef(Mutability),
|
BindByRef(Mutability),
|
||||||
BindByValue(Mutability),
|
BindByValue(Mutability),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
|
||||||
pub enum PatWildKind {
|
pub enum PatWildKind {
|
||||||
/// Represents the wildcard pattern `_`
|
/// Represents the wildcard pattern `_`
|
||||||
PatWildSingle,
|
PatWildSingle,
|
||||||
|
@ -548,7 +548,7 @@ pub enum PatWildKind {
|
||||||
PatWildMulti,
|
PatWildMulti,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub enum Pat_ {
|
pub enum Pat_ {
|
||||||
/// Represents a wildcard pattern (either `_` or `..`)
|
/// Represents a wildcard pattern (either `_` or `..`)
|
||||||
PatWild(PatWildKind),
|
PatWild(PatWildKind),
|
||||||
|
@ -577,13 +577,13 @@ pub enum Pat_ {
|
||||||
PatMac(Mac),
|
PatMac(Mac),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
|
||||||
pub enum Mutability {
|
pub enum Mutability {
|
||||||
MutMutable,
|
MutMutable,
|
||||||
MutImmutable,
|
MutImmutable,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
|
||||||
pub enum BinOp_ {
|
pub enum BinOp_ {
|
||||||
BiAdd,
|
BiAdd,
|
||||||
BiSub,
|
BiSub,
|
||||||
|
@ -607,7 +607,7 @@ pub enum BinOp_ {
|
||||||
|
|
||||||
pub type BinOp = Spanned<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 {
|
pub enum UnOp {
|
||||||
UnUniq,
|
UnUniq,
|
||||||
UnDeref,
|
UnDeref,
|
||||||
|
@ -617,7 +617,7 @@ pub enum UnOp {
|
||||||
|
|
||||||
pub type Stmt = Spanned<Stmt_>;
|
pub type Stmt = Spanned<Stmt_>;
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub enum Stmt_ {
|
pub enum Stmt_ {
|
||||||
/// Could be an item or a local (let) binding:
|
/// Could be an item or a local (let) binding:
|
||||||
StmtDecl(P<Decl>, NodeId),
|
StmtDecl(P<Decl>, NodeId),
|
||||||
|
@ -631,7 +631,7 @@ pub enum Stmt_ {
|
||||||
StmtMac(P<Mac>, MacStmtStyle),
|
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 {
|
pub enum MacStmtStyle {
|
||||||
/// The macro statement had a trailing semicolon, e.g. `foo! { ... };`
|
/// The macro statement had a trailing semicolon, e.g. `foo! { ... };`
|
||||||
/// `foo!(...);`, `foo![...];`
|
/// `foo!(...);`, `foo![...];`
|
||||||
|
@ -646,7 +646,7 @@ pub enum MacStmtStyle {
|
||||||
|
|
||||||
/// Where a local declaration came from: either a true `let ... =
|
/// Where a local declaration came from: either a true `let ... =
|
||||||
/// ...;`, or one desugared from the pattern of a for loop.
|
/// ...;`, 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 {
|
pub enum LocalSource {
|
||||||
LocalLet,
|
LocalLet,
|
||||||
LocalFor,
|
LocalFor,
|
||||||
|
@ -655,7 +655,7 @@ pub enum LocalSource {
|
||||||
// FIXME (pending discussion of #1697, #2178...): local should really be
|
// FIXME (pending discussion of #1697, #2178...): local should really be
|
||||||
// a refinement on pat.
|
// a refinement on pat.
|
||||||
/// Local represents a `let` statement, e.g., `let <pat>:<ty> = <expr>;`
|
/// 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 struct Local {
|
||||||
pub pat: P<Pat>,
|
pub pat: P<Pat>,
|
||||||
pub ty: Option<P<Ty>>,
|
pub ty: Option<P<Ty>>,
|
||||||
|
@ -667,7 +667,7 @@ pub struct Local {
|
||||||
|
|
||||||
pub type Decl = Spanned<Decl_>;
|
pub type Decl = Spanned<Decl_>;
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub enum Decl_ {
|
pub enum Decl_ {
|
||||||
/// A local (let) binding:
|
/// A local (let) binding:
|
||||||
DeclLocal(P<Local>),
|
DeclLocal(P<Local>),
|
||||||
|
@ -676,7 +676,7 @@ pub enum Decl_ {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// represents one arm of a 'match'
|
/// 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 struct Arm {
|
||||||
pub attrs: Vec<Attribute>,
|
pub attrs: Vec<Attribute>,
|
||||||
pub pats: Vec<P<Pat>>,
|
pub pats: Vec<P<Pat>>,
|
||||||
|
@ -684,7 +684,7 @@ pub struct Arm {
|
||||||
pub body: P<Expr>,
|
pub body: P<Expr>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub struct Field {
|
pub struct Field {
|
||||||
pub ident: SpannedIdent,
|
pub ident: SpannedIdent,
|
||||||
pub expr: P<Expr>,
|
pub expr: P<Expr>,
|
||||||
|
@ -693,26 +693,26 @@ pub struct Field {
|
||||||
|
|
||||||
pub type SpannedIdent = Spanned<Ident>;
|
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 {
|
pub enum BlockCheckMode {
|
||||||
DefaultBlock,
|
DefaultBlock,
|
||||||
UnsafeBlock(UnsafeSource),
|
UnsafeBlock(UnsafeSource),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
|
||||||
pub enum UnsafeSource {
|
pub enum UnsafeSource {
|
||||||
CompilerGenerated,
|
CompilerGenerated,
|
||||||
UserProvided,
|
UserProvided,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub struct Expr {
|
pub struct Expr {
|
||||||
pub id: NodeId,
|
pub id: NodeId,
|
||||||
pub node: Expr_,
|
pub node: Expr_,
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub enum Expr_ {
|
pub enum Expr_ {
|
||||||
/// First expr is the place; second expr is the value.
|
/// First expr is the place; second expr is the value.
|
||||||
ExprBox(Option<P<Expr>>, P<Expr>),
|
ExprBox(Option<P<Expr>>, P<Expr>),
|
||||||
|
@ -776,28 +776,28 @@ pub enum Expr_ {
|
||||||
/// <Vec<T> as SomeTrait>::SomeAssociatedItem
|
/// <Vec<T> as SomeTrait>::SomeAssociatedItem
|
||||||
/// ^~~~~ ^~~~~~~~~ ^~~~~~~~~~~~~~~~~~
|
/// ^~~~~ ^~~~~~~~~ ^~~~~~~~~~~~~~~~~~
|
||||||
/// self_type trait_name item_path
|
/// 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 struct QPath {
|
||||||
pub self_type: P<Ty>,
|
pub self_type: P<Ty>,
|
||||||
pub trait_ref: P<TraitRef>,
|
pub trait_ref: P<TraitRef>,
|
||||||
pub item_path: PathSegment,
|
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 {
|
pub enum MatchSource {
|
||||||
Normal,
|
Normal,
|
||||||
IfLetDesugar { contains_else_clause: bool },
|
IfLetDesugar { contains_else_clause: bool },
|
||||||
WhileLetDesugar,
|
WhileLetDesugar,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
|
||||||
pub enum CaptureClause {
|
pub enum CaptureClause {
|
||||||
CaptureByValue,
|
CaptureByValue,
|
||||||
CaptureByRef,
|
CaptureByRef,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A delimited sequence of token trees
|
/// 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 {
|
pub struct Delimited {
|
||||||
/// The type of delimiter
|
/// The type of delimiter
|
||||||
pub delim: token::DelimToken,
|
pub delim: token::DelimToken,
|
||||||
|
@ -832,7 +832,7 @@ impl Delimited {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A sequence of token treesee
|
/// A sequence of token treesee
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub struct SequenceRepetition {
|
pub struct SequenceRepetition {
|
||||||
/// The sequence of token trees
|
/// The sequence of token trees
|
||||||
pub tts: Vec<TokenTree>,
|
pub tts: Vec<TokenTree>,
|
||||||
|
@ -846,7 +846,7 @@ pub struct SequenceRepetition {
|
||||||
|
|
||||||
/// A Kleene-style [repetition operator](http://en.wikipedia.org/wiki/Kleene_star)
|
/// A Kleene-style [repetition operator](http://en.wikipedia.org/wiki/Kleene_star)
|
||||||
/// for token sequences.
|
/// for token sequences.
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
|
||||||
pub enum KleeneOp {
|
pub enum KleeneOp {
|
||||||
ZeroOrMore,
|
ZeroOrMore,
|
||||||
OneOrMore,
|
OneOrMore,
|
||||||
|
@ -864,7 +864,7 @@ pub enum KleeneOp {
|
||||||
///
|
///
|
||||||
/// The RHS of an MBE macro is the only place `SubstNt`s are substituted.
|
/// The RHS of an MBE macro is the only place `SubstNt`s are substituted.
|
||||||
/// Nothing special happens to misnamed or misplaced `SubstNt`s.
|
/// 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"]
|
#[doc="For macro invocations; parsing is delegated to the macro"]
|
||||||
pub enum TokenTree {
|
pub enum TokenTree {
|
||||||
/// A single token
|
/// A single token
|
||||||
|
@ -955,14 +955,14 @@ pub type Mac = Spanned<Mac_>;
|
||||||
/// is being invoked, and the vector of token-trees contains the source
|
/// is being invoked, and the vector of token-trees contains the source
|
||||||
/// of the macro invocation.
|
/// of the macro invocation.
|
||||||
/// There's only one flavor, now, so this could presumably be simplified.
|
/// 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_ {
|
pub enum Mac_ {
|
||||||
// NB: the additional ident for a macro_rules-style macro is actually
|
// NB: the additional ident for a macro_rules-style macro is actually
|
||||||
// stored in the enclosing item. Oog.
|
// stored in the enclosing item. Oog.
|
||||||
MacInvocTT(Path, Vec<TokenTree>, SyntaxContext), // new macro-invocation
|
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 {
|
pub enum StrStyle {
|
||||||
CookedStr,
|
CookedStr,
|
||||||
RawStr(usize)
|
RawStr(usize)
|
||||||
|
@ -970,7 +970,7 @@ pub enum StrStyle {
|
||||||
|
|
||||||
pub type Lit = Spanned<Lit_>;
|
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 {
|
pub enum Sign {
|
||||||
Minus,
|
Minus,
|
||||||
Plus
|
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 {
|
pub enum LitIntType {
|
||||||
SignedIntLit(IntTy, Sign),
|
SignedIntLit(IntTy, Sign),
|
||||||
UnsignedIntLit(UintTy),
|
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_ {
|
pub enum Lit_ {
|
||||||
LitStr(InternedString, StrStyle),
|
LitStr(InternedString, StrStyle),
|
||||||
LitBinary(Rc<Vec<u8>>),
|
LitBinary(Rc<Vec<u8>>),
|
||||||
|
@ -1017,13 +1017,13 @@ pub enum Lit_ {
|
||||||
|
|
||||||
// NB: If you change this, you'll probably want to change the corresponding
|
// NB: If you change this, you'll probably want to change the corresponding
|
||||||
// type structure in middle/ty.rs as well.
|
// 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 struct MutTy {
|
||||||
pub ty: P<Ty>,
|
pub ty: P<Ty>,
|
||||||
pub mutbl: Mutability,
|
pub mutbl: Mutability,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub struct TypeField {
|
pub struct TypeField {
|
||||||
pub ident: Ident,
|
pub ident: Ident,
|
||||||
pub mt: MutTy,
|
pub mt: MutTy,
|
||||||
|
@ -1032,7 +1032,7 @@ pub struct TypeField {
|
||||||
|
|
||||||
/// Represents a required method in a trait declaration,
|
/// Represents a required method in a trait declaration,
|
||||||
/// one without a default implementation
|
/// 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 struct TypeMethod {
|
||||||
pub ident: Ident,
|
pub ident: Ident,
|
||||||
pub attrs: Vec<Attribute>,
|
pub attrs: Vec<Attribute>,
|
||||||
|
@ -1050,26 +1050,26 @@ pub struct TypeMethod {
|
||||||
/// a default implementation A trait method is either required (meaning it
|
/// a default implementation A trait method is either required (meaning it
|
||||||
/// doesn't have an implementation, just a signature) or provided (meaning it
|
/// doesn't have an implementation, just a signature) or provided (meaning it
|
||||||
/// has a default implementation).
|
/// has a default implementation).
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub enum TraitItem {
|
pub enum TraitItem {
|
||||||
RequiredMethod(TypeMethod),
|
RequiredMethod(TypeMethod),
|
||||||
ProvidedMethod(P<Method>),
|
ProvidedMethod(P<Method>),
|
||||||
TypeTraitItem(P<AssociatedType>),
|
TypeTraitItem(P<AssociatedType>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub enum ImplItem {
|
pub enum ImplItem {
|
||||||
MethodImplItem(P<Method>),
|
MethodImplItem(P<Method>),
|
||||||
TypeImplItem(P<Typedef>),
|
TypeImplItem(P<Typedef>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub struct AssociatedType {
|
pub struct AssociatedType {
|
||||||
pub attrs: Vec<Attribute>,
|
pub attrs: Vec<Attribute>,
|
||||||
pub ty_param: TyParam,
|
pub ty_param: TyParam,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub struct Typedef {
|
pub struct Typedef {
|
||||||
pub id: NodeId,
|
pub id: NodeId,
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
|
@ -1196,7 +1196,7 @@ impl FloatTy {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bind a type to an associated type: `A=Foo`.
|
// 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 struct TypeBinding {
|
||||||
pub id: NodeId,
|
pub id: NodeId,
|
||||||
pub ident: Ident,
|
pub ident: Ident,
|
||||||
|
@ -1206,7 +1206,7 @@ pub struct TypeBinding {
|
||||||
|
|
||||||
|
|
||||||
// NB PartialEq method appears below.
|
// 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 struct Ty {
|
||||||
pub id: NodeId,
|
pub id: NodeId,
|
||||||
pub node: Ty_,
|
pub node: Ty_,
|
||||||
|
@ -1214,7 +1214,7 @@ pub struct Ty {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Not represented directly in the AST, referred to by name through a ty_path.
|
/// 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 {
|
pub enum PrimTy {
|
||||||
TyInt(IntTy),
|
TyInt(IntTy),
|
||||||
TyUint(UintTy),
|
TyUint(UintTy),
|
||||||
|
@ -1224,7 +1224,7 @@ pub enum PrimTy {
|
||||||
TyChar
|
TyChar
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub struct BareFnTy {
|
pub struct BareFnTy {
|
||||||
pub unsafety: Unsafety,
|
pub unsafety: Unsafety,
|
||||||
pub abi: Abi,
|
pub abi: Abi,
|
||||||
|
@ -1232,7 +1232,7 @@ pub struct BareFnTy {
|
||||||
pub decl: P<FnDecl>
|
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
|
/// The different kinds of types recognized by the compiler
|
||||||
pub enum Ty_ {
|
pub enum Ty_ {
|
||||||
TyVec(P<Ty>),
|
TyVec(P<Ty>),
|
||||||
|
@ -1265,13 +1265,13 @@ pub enum Ty_ {
|
||||||
TyInfer,
|
TyInfer,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
|
||||||
pub enum AsmDialect {
|
pub enum AsmDialect {
|
||||||
AsmAtt,
|
AsmAtt,
|
||||||
AsmIntel
|
AsmIntel
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub struct InlineAsm {
|
pub struct InlineAsm {
|
||||||
pub asm: InternedString,
|
pub asm: InternedString,
|
||||||
pub asm_str_style: StrStyle,
|
pub asm_str_style: StrStyle,
|
||||||
|
@ -1285,7 +1285,7 @@ pub struct InlineAsm {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// represents an argument in a function header
|
/// 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 struct Arg {
|
||||||
pub ty: P<Ty>,
|
pub ty: P<Ty>,
|
||||||
pub pat: P<Pat>,
|
pub pat: P<Pat>,
|
||||||
|
@ -1313,14 +1313,14 @@ impl Arg {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// represents the header (not the body) of a function declaration
|
/// 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 struct FnDecl {
|
||||||
pub inputs: Vec<Arg>,
|
pub inputs: Vec<Arg>,
|
||||||
pub output: FunctionRetTy,
|
pub output: FunctionRetTy,
|
||||||
pub variadic: bool
|
pub variadic: bool
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub enum Unsafety {
|
pub enum Unsafety {
|
||||||
Unsafe,
|
Unsafe,
|
||||||
Normal,
|
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 {
|
pub enum FunctionRetTy {
|
||||||
/// Functions with return type ! that always
|
/// Functions with return type ! that always
|
||||||
/// raise an error or exit (i.e. never return to the caller)
|
/// 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
|
/// 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_ {
|
pub enum ExplicitSelf_ {
|
||||||
/// No self
|
/// No self
|
||||||
SelfStatic,
|
SelfStatic,
|
||||||
|
@ -1391,7 +1391,7 @@ pub enum ExplicitSelf_ {
|
||||||
|
|
||||||
pub type ExplicitSelf = Spanned<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 struct Method {
|
||||||
pub attrs: Vec<Attribute>,
|
pub attrs: Vec<Attribute>,
|
||||||
pub id: NodeId,
|
pub id: NodeId,
|
||||||
|
@ -1399,7 +1399,7 @@ pub struct Method {
|
||||||
pub node: Method_,
|
pub node: Method_,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub enum Method_ {
|
pub enum Method_ {
|
||||||
/// Represents a method declaration
|
/// Represents a method declaration
|
||||||
MethDecl(Ident,
|
MethDecl(Ident,
|
||||||
|
@ -1414,7 +1414,7 @@ pub enum Method_ {
|
||||||
MethMac(Mac),
|
MethMac(Mac),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub struct Mod {
|
pub struct Mod {
|
||||||
/// A span from the first token past `{` to the last token until `}`.
|
/// A span from the first token past `{` to the last token until `}`.
|
||||||
/// For `mod foo;`, the inner span ranges from the first token
|
/// For `mod foo;`, the inner span ranges from the first token
|
||||||
|
@ -1423,30 +1423,30 @@ pub struct Mod {
|
||||||
pub items: Vec<P<Item>>,
|
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 struct ForeignMod {
|
||||||
pub abi: Abi,
|
pub abi: Abi,
|
||||||
pub items: Vec<P<ForeignItem>>,
|
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 struct VariantArg {
|
||||||
pub ty: P<Ty>,
|
pub ty: P<Ty>,
|
||||||
pub id: NodeId,
|
pub id: NodeId,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub enum VariantKind {
|
pub enum VariantKind {
|
||||||
TupleVariantKind(Vec<VariantArg>),
|
TupleVariantKind(Vec<VariantArg>),
|
||||||
StructVariantKind(P<StructDef>),
|
StructVariantKind(P<StructDef>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub struct EnumDef {
|
pub struct EnumDef {
|
||||||
pub variants: Vec<P<Variant>>,
|
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 struct Variant_ {
|
||||||
pub name: Ident,
|
pub name: Ident,
|
||||||
pub attrs: Vec<Attribute>,
|
pub attrs: Vec<Attribute>,
|
||||||
|
@ -1458,7 +1458,7 @@ pub struct Variant_ {
|
||||||
|
|
||||||
pub type Variant = Spanned<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_ {
|
pub enum PathListItem_ {
|
||||||
PathListIdent { name: Ident, id: NodeId },
|
PathListIdent { name: Ident, id: NodeId },
|
||||||
PathListMod { id: NodeId }
|
PathListMod { id: NodeId }
|
||||||
|
@ -1476,7 +1476,7 @@ pub type PathListItem = Spanned<PathListItem_>;
|
||||||
|
|
||||||
pub type ViewPath = Spanned<ViewPath_>;
|
pub type ViewPath = Spanned<ViewPath_>;
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub enum ViewPath_ {
|
pub enum ViewPath_ {
|
||||||
|
|
||||||
/// `foo::bar::baz as quux`
|
/// `foo::bar::baz as quux`
|
||||||
|
@ -1499,17 +1499,17 @@ pub type Attribute = Spanned<Attribute_>;
|
||||||
/// Distinguishes between Attributes that decorate items and Attributes that
|
/// Distinguishes between Attributes that decorate items and Attributes that
|
||||||
/// are contained as statements within items. These two cases need to be
|
/// are contained as statements within items. These two cases need to be
|
||||||
/// distinguished for pretty-printing.
|
/// 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 {
|
pub enum AttrStyle {
|
||||||
AttrOuter,
|
AttrOuter,
|
||||||
AttrInner,
|
AttrInner,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
|
||||||
pub struct AttrId(pub usize);
|
pub struct AttrId(pub usize);
|
||||||
|
|
||||||
/// Doc-comments are promoted to attributes that have is_sugared_doc = true
|
/// 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 struct Attribute_ {
|
||||||
pub id: AttrId,
|
pub id: AttrId,
|
||||||
pub style: AttrStyle,
|
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.
|
/// 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
|
/// If this impl is an ItemImpl, the impl_id is redundant (it could be the
|
||||||
/// same as the impl's node id).
|
/// 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 struct TraitRef {
|
||||||
pub path: Path,
|
pub path: Path,
|
||||||
pub ref_id: NodeId,
|
pub ref_id: NodeId,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub struct PolyTraitRef {
|
pub struct PolyTraitRef {
|
||||||
/// The `'a` in `<'a> Foo<&'a T>`
|
/// The `'a` in `<'a> Foo<&'a T>`
|
||||||
pub bound_lifetimes: Vec<LifetimeDef>,
|
pub bound_lifetimes: Vec<LifetimeDef>,
|
||||||
|
@ -1537,7 +1537,7 @@ pub struct PolyTraitRef {
|
||||||
pub trait_ref: TraitRef,
|
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 {
|
pub enum Visibility {
|
||||||
Public,
|
Public,
|
||||||
Inherited,
|
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 struct StructField_ {
|
||||||
pub kind: StructFieldKind,
|
pub kind: StructFieldKind,
|
||||||
pub id: NodeId,
|
pub id: NodeId,
|
||||||
|
@ -1571,7 +1571,7 @@ impl StructField_ {
|
||||||
|
|
||||||
pub type StructField = Spanned<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 {
|
pub enum StructFieldKind {
|
||||||
NamedField(Ident, Visibility),
|
NamedField(Ident, Visibility),
|
||||||
/// Element of a tuple-like struct
|
/// 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 {
|
pub struct StructDef {
|
||||||
/// Fields, not including ctor
|
/// Fields, not including ctor
|
||||||
pub fields: Vec<StructField>,
|
pub fields: Vec<StructField>,
|
||||||
|
@ -1600,7 +1600,7 @@ pub struct StructDef {
|
||||||
FIXME (#3300): Should allow items to be anonymous. Right now
|
FIXME (#3300): Should allow items to be anonymous. Right now
|
||||||
we just use dummy names for anon items.
|
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 struct Item {
|
||||||
pub ident: Ident,
|
pub ident: Ident,
|
||||||
pub attrs: Vec<Attribute>,
|
pub attrs: Vec<Attribute>,
|
||||||
|
@ -1610,7 +1610,7 @@ pub struct Item {
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub enum Item_ {
|
pub enum Item_ {
|
||||||
// Optional location (containing arbitrary characters) from which
|
// Optional location (containing arbitrary characters) from which
|
||||||
// to fetch the crate sources.
|
// 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 struct ForeignItem {
|
||||||
pub ident: Ident,
|
pub ident: Ident,
|
||||||
pub attrs: Vec<Attribute>,
|
pub attrs: Vec<Attribute>,
|
||||||
|
@ -1671,7 +1671,7 @@ pub struct ForeignItem {
|
||||||
pub vis: Visibility,
|
pub vis: Visibility,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub enum ForeignItem_ {
|
pub enum ForeignItem_ {
|
||||||
ForeignItemFn(P<FnDecl>, Generics),
|
ForeignItemFn(P<FnDecl>, Generics),
|
||||||
ForeignItemStatic(P<Ty>, /* is_mutbl */ bool),
|
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 {
|
pub enum ClosureKind {
|
||||||
FnClosureKind,
|
FnClosureKind,
|
||||||
FnMutClosureKind,
|
FnMutClosureKind,
|
||||||
|
@ -1696,7 +1696,7 @@ pub enum ClosureKind {
|
||||||
/// The data we save and restore about an inlined item or method. This is not
|
/// 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
|
/// part of the AST that we parse from a file, but it becomes part of the tree
|
||||||
/// that we trans.
|
/// that we trans.
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub enum InlinedItem {
|
pub enum InlinedItem {
|
||||||
IIItem(P<Item>),
|
IIItem(P<Item>),
|
||||||
IITraitItem(DefId /* impl id */, TraitItem),
|
IITraitItem(DefId /* impl id */, TraitItem),
|
||||||
|
@ -1707,7 +1707,7 @@ pub enum InlinedItem {
|
||||||
/// A macro definition, in this crate or imported from another.
|
/// A macro definition, in this crate or imported from another.
|
||||||
///
|
///
|
||||||
/// Not parsed directly, but created on macro import or `macro_rules!` expansion.
|
/// 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 struct MacroDef {
|
||||||
pub ident: Ident,
|
pub ident: Ident,
|
||||||
pub attrs: Vec<Attribute>,
|
pub attrs: Vec<Attribute>,
|
||||||
|
|
|
@ -32,7 +32,7 @@ use std::slice;
|
||||||
|
|
||||||
pub mod blocks;
|
pub mod blocks;
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Show)]
|
#[derive(Clone, Copy, PartialEq, Debug)]
|
||||||
pub enum PathElem {
|
pub enum PathElem {
|
||||||
PathMod(Name),
|
PathMod(Name),
|
||||||
PathName(Name)
|
PathName(Name)
|
||||||
|
@ -104,7 +104,7 @@ pub fn path_to_string<PI: Iterator<Item=PathElem>>(path: PI) -> String {
|
||||||
}).to_string()
|
}).to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
pub enum Node<'ast> {
|
pub enum Node<'ast> {
|
||||||
NodeItem(&'ast Item),
|
NodeItem(&'ast Item),
|
||||||
NodeForeignItem(&'ast ForeignItem),
|
NodeForeignItem(&'ast ForeignItem),
|
||||||
|
@ -126,7 +126,7 @@ pub enum Node<'ast> {
|
||||||
|
|
||||||
/// Represents an entry and its parent Node ID
|
/// Represents an entry and its parent Node ID
|
||||||
/// The odd layout is to bring down the total size.
|
/// The odd layout is to bring down the total size.
|
||||||
#[derive(Copy, Show)]
|
#[derive(Copy, Debug)]
|
||||||
enum MapEntry<'ast> {
|
enum MapEntry<'ast> {
|
||||||
/// Placeholder for holes in the map.
|
/// Placeholder for holes in the map.
|
||||||
NotPresent,
|
NotPresent,
|
||||||
|
@ -157,7 +157,7 @@ impl<'ast> Clone for MapEntry<'ast> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Show)]
|
#[derive(Debug)]
|
||||||
struct InlinedParent {
|
struct InlinedParent {
|
||||||
path: Vec<PathElem>,
|
path: Vec<PathElem>,
|
||||||
ii: InlinedItem
|
ii: InlinedItem
|
||||||
|
|
|
@ -352,7 +352,7 @@ pub fn empty_generics() -> Generics {
|
||||||
// ______________________________________________________________________
|
// ______________________________________________________________________
|
||||||
// Enumerating the IDs which appear in an AST
|
// Enumerating the IDs which appear in an AST
|
||||||
|
|
||||||
#[derive(RustcEncodable, RustcDecodable, Show, Copy)]
|
#[derive(RustcEncodable, RustcDecodable, Debug, Copy)]
|
||||||
pub struct IdRange {
|
pub struct IdRange {
|
||||||
pub min: NodeId,
|
pub min: NodeId,
|
||||||
pub max: 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.
|
/// Represents the #[deprecated] and friends attributes.
|
||||||
#[derive(RustcEncodable,RustcDecodable,Clone,Show)]
|
#[derive(RustcEncodable,RustcDecodable,Clone,Debug)]
|
||||||
pub struct Stability {
|
pub struct Stability {
|
||||||
pub level: StabilityLevel,
|
pub level: StabilityLevel,
|
||||||
pub feature: InternedString,
|
pub feature: InternedString,
|
||||||
|
@ -358,7 +358,7 @@ pub struct Stability {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The available stability levels.
|
/// The available stability levels.
|
||||||
#[derive(RustcEncodable,RustcDecodable,PartialEq,PartialOrd,Clone,Show,Copy)]
|
#[derive(RustcEncodable,RustcDecodable,PartialEq,PartialOrd,Clone,Debug,Copy)]
|
||||||
pub enum StabilityLevel {
|
pub enum StabilityLevel {
|
||||||
Unstable,
|
Unstable,
|
||||||
Stable,
|
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 {
|
pub enum ReprAttr {
|
||||||
ReprAny,
|
ReprAny,
|
||||||
ReprInt(Span, IntType),
|
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 {
|
pub enum IntType {
|
||||||
SignedInt(ast::IntTy),
|
SignedInt(ast::IntTy),
|
||||||
UnsignedInt(ast::UintTy)
|
UnsignedInt(ast::UintTy)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue