pub msg: String,
}
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
enum WhichLine { ThisLine, FollowPrevious(uint), AdjustBackward(uint) }
/// Looks for either "//~| KIND MESSAGE" or "//~^^... KIND MESSAGE"
Here's an example of using `Result`:
```rust
-#[derive(Show)]
+#[derive(Debug)]
enum Version { Version1, Version2 }
-#[derive(Show)]
+#[derive(Debug)]
enum ParseError { InvalidHeaderLength, InvalidVersion }
fn parse_version(header: &[u8]) -> Result<Version, ParseError> {
```{rust}
-#[derive(Show)]
+#[derive(Debug)]
enum List<T> {
Cons(T, Box<List<T>>),
Nil,
}
// 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> }
}
//! Creating a recursive data structure:
//!
//! ```
-//! #[derive(Show)]
+//! #[derive(Debug)]
//! enum List<T> {
//! Cons(T, Box<List<T>>),
//! Nil,
use super::{EnumSet, CLike};
- #[derive(Copy, PartialEq, Show)]
+ #[derive(Copy, PartialEq, Debug)]
#[repr(uint)]
enum Foo {
A, B, C
})
}
- #[derive(Clone, PartialEq, Show)]
+ #[derive(Clone, PartialEq, Debug)]
enum Taggy {
One(int),
Two(int, int),
Three(int, int, int),
}
- #[derive(Clone, PartialEq, Show)]
+ #[derive(Clone, PartialEq, Debug)]
enum Taggypar<T> {
Onepar(int),
Twopar(int, int),
Threepar(int, int, int),
}
- #[derive(Clone, PartialEq, Show)]
+ #[derive(Clone, PartialEq, Debug)]
struct RecCy {
x: int,
y: int,
/// A possible error value from the `String::from_utf8` function.
#[stable(feature = "rust1", since = "1.0.0")]
-#[derive(Show)]
+#[derive(Debug)]
pub struct FromUtf8Error {
bytes: Vec<u8>,
error: Utf8Error,
/// A possible error value from the `String::from_utf16` function.
#[stable(feature = "rust1", since = "1.0.0")]
#[allow(missing_copy_implementations)]
-#[derive(Show)]
+#[derive(Debug)]
pub struct FromUtf16Error(());
impl String {
/// let w = v.map_in_place(|i| i + 3);
/// assert_eq!(w.as_slice(), [3, 4, 5].as_slice());
///
- /// #[derive(PartialEq, Show)]
+ /// #[derive(PartialEq, Debug)]
/// struct Newtype(u8);
/// let bytes = vec![0x11, 0x22];
/// let newtyped_bytes = bytes.map_in_place(|x| Newtype(x));
#[test]
fn test_map_in_place_zero_sized() {
let v = vec![(), ()];
- #[derive(PartialEq, Show)]
+ #[derive(PartialEq, Debug)]
struct ZeroSized;
assert_eq!(v.map_in_place(|_| ZeroSized), [ZeroSized, ZeroSized]);
}
fn test_map_in_place_zero_drop_count() {
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
- #[derive(Clone, PartialEq, Show)]
+ #[derive(Clone, PartialEq, Debug)]
struct Nothing;
impl Drop for Nothing { fn drop(&mut self) { } }
- #[derive(Clone, PartialEq, Show)]
+ #[derive(Clone, PartialEq, Debug)]
struct ZeroSized;
impl Drop for ZeroSized {
fn drop(&mut self) {
///
/// A `TypeId` is currently only available for types which ascribe to `'static`,
/// but this limitation may be removed in the future.
-#[derive(Clone, Copy, PartialEq, Eq, Show, Hash)]
+#[derive(Clone, Copy, PartialEq, Eq, Debug, Hash)]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct TypeId {
t: u64,
}
/// An ordering is, e.g, a result of a comparison between two values.
-#[derive(Clone, Copy, PartialEq, Show)]
+#[derive(Clone, Copy, PartialEq, Debug)]
#[stable(feature = "rust1", since = "1.0.0")]
pub enum Ordering {
/// An ordering where a compared value is less [than another].
/// some other means.
#[unstable(feature = "core",
reason = "core and I/O reconciliation may alter this definition")]
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub struct Error;
/// A collection of methods that are required to format a message into a stream.
impl_multiplicative! { f64, 1.0 }
/// `MinMaxResult` is an enum returned by `min_max`. See `IteratorOrdExt::min_max` for more detail.
-#[derive(Clone, PartialEq, Show)]
+#[derive(Clone, PartialEq, Debug)]
#[unstable(feature = "core",
reason = "unclear whether such a fine-grained result is widely useful")]
pub enum MinMaxResult<T> {
/// words:
///
/// ```
-/// #[derive(Show)]
+/// #[derive(Debug)]
/// struct Foo;
///
/// let x = Foo;
///
/// ```
/// // we can just derive a `Copy` implementation
-/// #[derive(Show, Copy)]
+/// #[derive(Debug, Copy)]
/// struct Foo;
///
/// let x = Foo;
/// A wrapper type for raw pointers and integers that will never be
/// NULL or 0 that might allow certain optimizations.
#[lang="non_zero"]
-#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Show, Hash)]
+#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Hash)]
#[unstable(feature = "core")]
pub struct NonZero<T: Zeroable>(T);
impl_num_cast! { f64, to_f64 }
/// Used for representing the classification of floating point numbers
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
#[unstable(feature = "core", reason = "may be renamed")]
pub enum FpCategory {
/// "Not a Number", often obtained by dividing by zero
//! ```rust
//! use std::ops::{Add, Sub};
//!
-//! #[derive(Show)]
+//! #[derive(Debug)]
//! struct Point {
//! x: int,
//! y: int
// which basically means it must be `Option`.
/// The `Option` type.
-#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Show, Hash)]
+#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
#[stable(feature = "rust1", since = "1.0.0")]
pub enum Option<T> {
/// No value
//! defined and used like so:
//!
//! ```
-//! #[derive(Show)]
+//! #[derive(Debug)]
//! enum Version { Version1, Version2 }
//!
//! fn parse_version(header: &[u8]) -> Result<Version, &'static str> {
/// `Result` is a type that represents either success (`Ok`) or failure (`Err`).
///
/// See the [`std::result`](index.html) module documentation for details.
-#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Show, Hash)]
+#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
#[must_use]
#[stable(feature = "rust1", since = "1.0.0")]
pub enum Result<T, E> {
#[unstable(feature = "core")]
#[simd]
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
#[repr(C)]
pub struct i8x16(pub i8, pub i8, pub i8, pub i8,
pub i8, pub i8, pub i8, pub i8,
#[unstable(feature = "core")]
#[simd]
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
#[repr(C)]
pub struct i16x8(pub i16, pub i16, pub i16, pub i16,
pub i16, pub i16, pub i16, pub i16);
#[unstable(feature = "core")]
#[simd]
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
#[repr(C)]
pub struct i32x4(pub i32, pub i32, pub i32, pub i32);
#[unstable(feature = "core")]
#[simd]
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
#[repr(C)]
pub struct i64x2(pub i64, pub i64);
#[unstable(feature = "core")]
#[simd]
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
#[repr(C)]
pub struct u8x16(pub u8, pub u8, pub u8, pub u8,
pub u8, pub u8, pub u8, pub u8,
#[unstable(feature = "core")]
#[simd]
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
#[repr(C)]
pub struct u16x8(pub u16, pub u16, pub u16, pub u16,
pub u16, pub u16, pub u16, pub u16);
#[unstable(feature = "core")]
#[simd]
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
#[repr(C)]
pub struct u32x4(pub u32, pub u32, pub u32, pub u32);
#[unstable(feature = "core")]
#[simd]
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
#[repr(C)]
pub struct u64x2(pub u64, pub u64);
#[unstable(feature = "core")]
#[simd]
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
#[repr(C)]
pub struct f32x4(pub f32, pub f32, pub f32, pub f32);
#[unstable(feature = "core")]
#[simd]
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
#[repr(C)]
pub struct f64x2(pub f64, pub f64);
*/
/// Errors which can occur when attempting to interpret a byte slice as a `str`.
-#[derive(Copy, Eq, PartialEq, Clone, Show)]
+#[derive(Copy, Eq, PartialEq, Clone, Debug)]
#[unstable(feature = "core",
reason = "error enumeration recently added and definitions may be refined")]
pub enum Utf8Error {
use test::Bencher;
use test;
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
struct Test;
static TEST: &'static str = "Test";
use std::result;
/// Name of an option. Either a string or a single char.
-#[derive(Clone, PartialEq, Eq, Show)]
+#[derive(Clone, PartialEq, Eq, Debug)]
pub enum Name {
/// A string representing the long name of an option.
/// For example: "help"
}
/// Describes whether an option has an argument.
-#[derive(Clone, Copy, PartialEq, Eq, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Debug)]
pub enum HasArg {
/// The option requires an argument.
Yes,
}
/// Describes how often an option may occur.
-#[derive(Clone, Copy, PartialEq, Eq, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Debug)]
pub enum Occur {
/// The option occurs once.
Req,
}
/// A description of a possible option.
-#[derive(Clone, PartialEq, Eq, Show)]
+#[derive(Clone, PartialEq, Eq, Debug)]
pub struct Opt {
/// Name of the option
pub name: Name,
/// One group of options, e.g., both `-h` and `--help`, along with
/// their shared description and properties.
-#[derive(Clone, PartialEq, Eq, Show)]
+#[derive(Clone, PartialEq, Eq, Debug)]
pub struct OptGroup {
/// Short name of the option, e.g. `h` for a `-h` option
pub short_name: String,
}
/// Describes whether an option is given at all or has a value.
-#[derive(Clone, PartialEq, Eq, Show)]
+#[derive(Clone, PartialEq, Eq, Debug)]
enum Optval {
Val(String),
Given,
/// The result of checking command line arguments. Contains a vector
/// of matches and a vector of free strings.
-#[derive(Clone, PartialEq, Eq, Show)]
+#[derive(Clone, PartialEq, Eq, Debug)]
pub struct Matches {
/// Options that matched
opts: Vec<Opt>,
/// The type returned when the command line does not conform to the
/// expected format. Use the `Show` implementation to output detailed
/// information.
-#[derive(Clone, PartialEq, Eq, Show)]
+#[derive(Clone, PartialEq, Eq, Debug)]
pub enum Fail {
/// The option requires an argument but none was passed.
ArgumentMissing(String),
}
/// The type of failure that occurred.
-#[derive(Copy, PartialEq, Eq, Show)]
+#[derive(Copy, PartialEq, Eq, Debug)]
#[allow(missing_docs)]
pub enum FailType {
ArgumentMissing_,
fn target(&'a self, edge: &E) -> N;
}
-#[derive(Copy, PartialEq, Eq, Show)]
+#[derive(Copy, PartialEq, Eq, Debug)]
pub enum RenderOption {
NoEdgeLabels,
NoNodeLabels,
use std::ascii::AsciiExt;
use std::cmp;
-#[derive(Show, Clone)]
+#[derive(Debug, Clone)]
pub struct LogDirective {
pub name: Option<String>,
pub level: u32,
}
/// Wraps the log level with fmt implementations.
-#[derive(Copy, PartialEq, PartialOrd, Show)]
+#[derive(Copy, PartialEq, PartialOrd, Debug)]
pub struct LogLevel(pub u32);
impl fmt::Display for LogLevel {
/// A LogRecord is created by the logging macros, and passed as the only
/// argument to Loggers.
-#[derive(Show)]
+#[derive(Debug)]
pub struct LogRecord<'a> {
/// The module path of where the LogRecord originated.
use {Rng, Rand};
use super::{RandSample, WeightedChoice, Weighted, Sample, IndependentSample};
- #[derive(PartialEq, Show)]
+ #[derive(PartialEq, Debug)]
struct ConstRand(uint);
impl Rand for ConstRand {
fn rand<R: Rng>(_: &mut R) -> ConstRand {
pub doc: Doc<'a>,
}
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub enum EbmlEncoderTag {
EsUint, // 0
EsU64, // 1
EsLabel, // Used only when debugging
}
-#[derive(Show)]
+#[derive(Debug)]
pub enum Error {
IntTooBig(uint),
Expected(String),
pub use lint::context::{Context, LintStore, raw_emit_lint, check_crate, gather_attrs};
/// Specification of a single lint.
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub struct Lint {
/// A string identifier for the lint.
///
}
/// Setting for how to handle a lint.
-#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Show)]
+#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug)]
pub enum Level {
Allow, Warn, Deny, Forbid
}
pub const tag_items_data_item_repr: uint = 0x93;
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct LinkMeta {
pub crate_name: String,
pub crate_hash: Svh,
pub span: Span,
}
-#[derive(Copy, Show, PartialEq, Clone)]
+#[derive(Copy, Debug, PartialEq, Clone)]
pub enum LinkagePreference {
RequireDynamic,
RequireStatic,
}
// Something that a name can resolve to.
-#[derive(Copy, Clone, Show)]
+#[derive(Copy, Clone, Debug)]
pub enum DefLike {
DlDef(def::Def),
DlImpl(ast::DefId),
// def-id will depend on where it originated from. Therefore, the conversion
// function is given an indicator of the source of the def-id. See
// astencode.rs for more information.
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub enum DefIdSource {
// Identifies a struct, trait, enum, etc.
NominalType,
use syntax::print::{pp, pprust};
use util::nodemap::NodeMap;
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub enum EntryOrExit {
Entry,
Exit,
use std::cell::RefCell;
-#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum Def {
DefFn(ast::DefId, bool /* is_ctor */),
DefStaticMethod(/* method */ ast::DefId, MethodProvenance),
pub def_id: ast::DefId, // The definition of the target.
}
-#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum MethodProvenance {
FromTrait(ast::DefId),
FromImpl(ast::DefId),
}
-#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum TyParamProvenance {
FromSelf(ast::DefId),
FromParam(ast::DefId),
mode: MutateMode);
}
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub enum LoanCause {
ClosureCapture(Span),
AddrOf,
MatchDiscriminant
}
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub enum ConsumeMode {
Copy, // reference to x where x has a type that copies
Move(MoveReason), // reference to x where x has a type that moves
}
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub enum MoveReason {
DirectRefMove,
PatBindingMove,
CaptureMove,
}
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub enum MatchMode {
NonBindingMatch,
BorrowingMatch,
MovingMatch,
}
-#[derive(PartialEq,Show)]
+#[derive(PartialEq,Debug)]
enum TrackMatchMode<T> {
Unknown,
Definite(MatchMode),
}
}
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub enum MutateMode {
Init,
JustWrite, // x = y
}
}
-#[derive(Clone, Copy, PartialEq, Show)]
+#[derive(Clone, Copy, PartialEq, Debug)]
pub struct NodeIndex(pub uint);
#[allow(non_upper_case_globals)]
pub const InvalidNodeIndex: NodeIndex = NodeIndex(uint::MAX);
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub struct EdgeIndex(pub uint);
#[allow(non_upper_case_globals)]
pub const InvalidEdgeIndex: EdgeIndex = EdgeIndex(uint::MAX);
// Use a private field here to guarantee no more instances are created:
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub struct Direction { repr: uint }
#[allow(non_upper_case_globals)]
pub const Outgoing: Direction = Direction { repr: 0 };
/// Why did we require that the two types be related?
///
/// See `error_reporting.rs` for more details
-#[derive(Clone, Copy, Show)]
+#[derive(Clone, Copy, Debug)]
pub enum TypeOrigin {
// Not yet categorized in a better way
Misc(Span),
}
/// See `error_reporting.rs` for more details
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub enum ValuePairs<'tcx> {
Types(ty::expected_found<Ty<'tcx>>),
TraitRefs(ty::expected_found<Rc<ty::TraitRef<'tcx>>>),
/// encounter an error or subtyping constraint.
///
/// See `error_reporting.rs` for more details.
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct TypeTrace<'tcx> {
origin: TypeOrigin,
values: ValuePairs<'tcx>,
/// The origin of a `r1 <= r2` constraint.
///
/// See `error_reporting.rs` for more details
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub enum SubregionOrigin<'tcx> {
// Arose from a subtyping relation
Subtype(TypeTrace<'tcx>),
}
/// Times when we replace late-bound regions with variables:
-#[derive(Clone, Copy, Show)]
+#[derive(Clone, Copy, Debug)]
pub enum LateBoundRegionConversionTime {
/// when a fn is called
FnCall,
/// Reasons to create a region inference variable
///
/// See `error_reporting.rs` for more details
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub enum RegionVariableOrigin<'tcx> {
// Region variables created for ill-categorized reasons,
// mostly indicates places in need of refactoring
BoundRegionInCoherence(ast::Name),
}
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub enum fixup_err {
unresolved_int_ty(IntVid),
unresolved_float_ty(FloatVid),
node_ids: FnvHashMap<Node, uint>,
}
-#[derive(Clone, Hash, PartialEq, Eq, Show)]
+#[derive(Clone, Hash, PartialEq, Eq, Debug)]
enum Node {
RegionVid(ty::RegionVid),
Region(ty::Region),
mod graphviz;
// A constraint that influences the inference process.
-#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub enum Constraint {
// One region variable is subregion of another
ConstrainVarSubVar(RegionVid, RegionVid),
VerifyGenericBound(GenericKind<'tcx>, SubregionOrigin<'tcx>, Region, Vec<Region>),
}
-#[derive(Clone, Show, PartialEq, Eq)]
+#[derive(Clone, Debug, PartialEq, Eq)]
pub enum GenericKind<'tcx> {
Param(ty::ParamTy),
Projection(ty::ProjectionTy<'tcx>),
Lub, Glb
}
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub enum RegionResolutionError<'tcx> {
/// `ConcreteFailure(o, a, b)`:
///
/// ```
/// would report an error because we expect 'a and 'b to match, and so we group
/// 'a and 'b together inside a SameRegions struct
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct SameRegions {
pub scope_id: ast::NodeId,
pub regions: Vec<BoundRegion>
values: RefCell<Option<Vec<VarValue>>>,
}
-#[derive(Show)]
+#[derive(Debug)]
#[allow(missing_copy_implementations)]
pub struct RegionSnapshot {
length: uint,
// ______________________________________________________________________
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
enum Classification { Expanding, Contracting }
#[derive(Copy)]
type Relation = (RelationDir, ty::TyVid);
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub enum RelationDir {
SubtypeOf, SupertypeOf, EqTo
}
/// to keep the DAG relatively balanced, which helps keep the running
/// time of the algorithm under control. For more information, see
/// <http://en.wikipedia.org/wiki/Disjoint-set_data_structure>.
-#[derive(PartialEq,Clone,Show)]
+#[derive(PartialEq,Clone,Debug)]
pub enum VarValue<K:UnifyKey> {
Redirect(K),
Root(K::Value, uint),
}
}
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
enum LiveNodeKind {
FreeVarNode(Span),
ExprNode(Span),
var_nid: NodeId
}
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
struct LocalInfo {
id: NodeId,
ident: ast::Ident
}
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
enum VarKind {
Arg(NodeId, ast::Ident),
Local(LocalInfo),
use std::cell::RefCell;
use std::rc::Rc;
-#[derive(Clone, PartialEq, Show)]
+#[derive(Clone, PartialEq, Debug)]
pub enum categorization<'tcx> {
cat_rvalue(ty::Region), // temporary val, argument is its scope
cat_static_item,
}
// Represents any kind of upvar
-#[derive(Clone, Copy, PartialEq, Show)]
+#[derive(Clone, Copy, PartialEq, Debug)]
pub struct Upvar {
pub id: ty::UpvarId,
pub kind: ty::ClosureKind
}
// different kinds of pointers:
-#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub enum PointerKind {
/// `Box<T>`
Unique,
// We use the term "interior" to mean "something reachable from the
// base without a pointer dereference", e.g. a field
-#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub enum InteriorKind {
InteriorField(FieldName),
InteriorElement(ElementKind),
}
-#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub enum FieldName {
NamedField(ast::Name),
PositionalField(uint)
}
-#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub enum ElementKind {
VecElement,
OtherElement,
}
-#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub enum MutabilityCategory {
McImmutable, // Immutable.
McDeclared, // Directly declared as mutable.
// Upvar categorization can generate a variable number of nested
// derefs. The note allows detecting them without deep pattern
// matching on the categorization.
-#[derive(Clone, Copy, PartialEq, Show)]
+#[derive(Clone, Copy, PartialEq, Debug)]
pub enum Note {
NoteClosureEnv(ty::UpvarId), // Deref through closure env
NoteUpvarRef(ty::UpvarId), // Deref through by-ref upvar
// dereference, but its type is the type *before* the dereference
// (`@T`). So use `cmt.ty` to find the type of the value in a consistent
// fashion. For more details, see the method `cat_pattern`
-#[derive(Clone, PartialEq, Show)]
+#[derive(Clone, PartialEq, Debug)]
pub struct cmt_<'tcx> {
pub id: ast::NodeId, // id of expr/pat producing this value
pub span: Span, // span of same expr/pat
// FIXME: dox
pub type LastPrivateMap = NodeMap<LastPrivate>;
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub enum LastPrivate {
LastMod(PrivateDep),
// `use` directives (imports) can refer to two separate definitions in the
type_used: ImportUse},
}
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub enum PrivateDep {
AllPublic,
DependsOn(ast::DefId),
}
// How an import is used.
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub enum ImportUse {
Unused, // The import is not used.
Used, // The import is used.
/// actually attach a more meaningful ordering to scopes than the one
/// generated via deriving here.
#[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash, RustcEncodable,
- RustcDecodable, Show, Copy)]
+ RustcDecodable, Debug, Copy)]
pub enum CodeExtent {
Misc(ast::NodeId),
Remainder(BlockRemainder),
/// * the subscope with `first_statement_index == 1` is scope of `c`,
/// and thus does not include EXPR_2, but covers the `...`.
#[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash, RustcEncodable,
- RustcDecodable, Show, Copy)]
+ RustcDecodable, Debug, Copy)]
pub struct BlockRemainder {
pub block: ast::NodeId,
pub first_statement_index: uint,
/// Carries the node id for the innermost block or match expression,
/// for building up the `var_map` which maps ids to the blocks in
/// which they were declared.
-#[derive(PartialEq, Eq, Show, Copy)]
+#[derive(PartialEq, Eq, Debug, Copy)]
enum InnermostDeclaringBlock {
None,
Block(ast::NodeId),
/// Contextual information for declarations introduced by a statement
/// (i.e. `let`). It carries node-id's for statement and enclosing
/// block both, as well as the statement's index within the block.
-#[derive(PartialEq, Eq, Show, Copy)]
+#[derive(PartialEq, Eq, Debug, Copy)]
struct DeclaringStatementContext {
stmt_id: ast::NodeId,
block_id: ast::NodeId,
}
}
-#[derive(PartialEq, Eq, Show, Copy)]
+#[derive(PartialEq, Eq, Debug, Copy)]
enum InnermostEnclosingExpr {
None,
Some(ast::NodeId),
}
}
-#[derive(Show, Copy)]
+#[derive(Debug, Copy)]
pub struct Context {
var_parent: InnermostDeclaringBlock,
use syntax::visit::Visitor;
use util::nodemap::NodeMap;
-#[derive(Clone, Copy, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Debug)]
pub enum DefRegion {
DefStaticRegion,
DefEarlyBoundRegion(/* space */ subst::ParamSpace,
/// identify each in-scope parameter by an *index* and a *parameter
/// space* (which indices where the parameter is defined; see
/// `ParamSpace`).
-#[derive(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub struct Substs<'tcx> {
pub types: VecPerParamSpace<Ty<'tcx>>,
pub regions: RegionSubsts,
/// Represents the values to use when substituting lifetime parameters.
/// If the value is `ErasedRegions`, then this subst is occurring during
/// trans, and all region parameters will be replaced with `ty::ReStatic`.
-#[derive(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub enum RegionSubsts {
ErasedRegions,
NonerasedRegions(VecPerParamSpace<ty::Region>)
// ParamSpace
#[derive(PartialOrd, Ord, PartialEq, Eq, Copy,
- Clone, Hash, RustcEncodable, RustcDecodable, Show)]
+ Clone, Hash, RustcEncodable, RustcDecodable, Debug)]
pub enum ParamSpace {
TypeSpace, // Type parameters attached to a type definition, trait, or impl
SelfSpace, // Self parameter on a trait
pub type Selection<'tcx> = Vtable<'tcx, PredicateObligation<'tcx>>;
-#[derive(Clone,Show)]
+#[derive(Clone,Debug)]
pub enum SelectionError<'tcx> {
Unimplemented,
Overflow,
/// ### The type parameter `N`
///
/// See explanation on `VtableImplData`.
-#[derive(Show,Clone)]
+#[derive(Debug,Clone)]
pub enum Vtable<'tcx, N> {
/// Vtable identifying a particular impl.
VtableImpl(VtableImplData<'tcx, N>),
pub nested: subst::VecPerParamSpace<N>
}
-#[derive(Show,Clone)]
+#[derive(Debug,Clone)]
pub struct VtableBuiltinData<N> {
pub nested: subst::VecPerParamSpace<N>
}
}
/// Reasons a method might not be object-safe.
-#[derive(Copy,Clone,Show)]
+#[derive(Copy,Clone,Debug)]
pub enum MethodViolationCode {
/// e.g., `fn(self)`
ByValueSelf,
MethodDidNotMatch,
}
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub enum MethodMatchedData {
// In the case of a precise match, we don't really need to store
// how the match was found. So don't.
/// matching where clause. Part of the reason for this is that where
/// clauses can give additional information (like, the types of output
/// parameters) that would have to be inferred from the impl.
-#[derive(PartialEq,Eq,Show,Clone)]
+#[derive(PartialEq,Eq,Debug,Clone)]
enum SelectionCandidate<'tcx> {
BuiltinCandidate(ty::BuiltinBound),
ParamCandidate(ty::PolyTraitRef<'tcx>),
AmbiguousBuiltin
}
-#[derive(Show)]
+#[derive(Debug)]
enum EvaluationResult<'tcx> {
EvaluatedToOk,
EvaluatedToAmbig,
pub mt: mt<'tcx>
}
-#[derive(Clone, Copy, Show)]
+#[derive(Clone, Copy, Debug)]
pub enum ImplOrTraitItemContainer {
TraitContainer(ast::DefId),
ImplContainer(ast::DefId),
}
}
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub enum ImplOrTraitItem<'tcx> {
MethodTraitItem(Rc<Method<'tcx>>),
TypeTraitItem(Rc<AssociatedType>),
}
}
-#[derive(Clone, Copy, Show)]
+#[derive(Clone, Copy, Debug)]
pub enum ImplOrTraitItemId {
MethodTraitItemId(ast::DefId),
TypeTraitItemId(ast::DefId),
}
}
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct Method<'tcx> {
pub name: ast::Name,
pub generics: ty::Generics<'tcx>,
}
}
-#[derive(Clone, Copy, Show)]
+#[derive(Clone, Copy, Debug)]
pub struct AssociatedType {
pub name: ast::Name,
pub vis: ast::Visibility,
pub container: ImplOrTraitItemContainer,
}
-#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub struct mt<'tcx> {
pub ty: Ty<'tcx>,
pub mutbl: ast::Mutability,
}
-#[derive(Clone, Copy, Show)]
+#[derive(Clone, Copy, Debug)]
pub struct field_ty {
pub name: Name,
pub id: DefId,
pub regions: VecPerParamSpace<Variance>,
}
-#[derive(Clone, PartialEq, RustcDecodable, RustcEncodable, Show, Copy)]
+#[derive(Clone, PartialEq, RustcDecodable, RustcEncodable, Debug, Copy)]
pub enum Variance {
Covariant, // T<A> <: T<B> iff A <: B -- e.g., function return type
Invariant, // T<A> <: T<B> iff B == A -- e.g., type of mutable cell
Bivariant, // T<A> <: T<B> -- e.g., unused type parameter
}
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub enum AutoAdjustment<'tcx> {
AdjustReifyFnPointer(ast::DefId), // go from a fn-item type to a fn-pointer type
AdjustDerefRef(AutoDerefRef<'tcx>)
}
-#[derive(Clone, PartialEq, Show)]
+#[derive(Clone, PartialEq, Debug)]
pub enum UnsizeKind<'tcx> {
// [T, ..n] -> [T], the uint field is n.
UnsizeLength(uint),
UnsizeVtable(TyTrait<'tcx>, /* the self type of the trait */ Ty<'tcx>)
}
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct AutoDerefRef<'tcx> {
pub autoderefs: uint,
pub autoref: Option<AutoRef<'tcx>>
}
-#[derive(Clone, PartialEq, Show)]
+#[derive(Clone, PartialEq, Debug)]
pub enum AutoRef<'tcx> {
/// Convert from T to &T
/// The third field allows us to wrap other AutoRef adjustments.
}
}
-#[derive(Clone, Copy, RustcEncodable, RustcDecodable, PartialEq, PartialOrd, Show)]
+#[derive(Clone, Copy, RustcEncodable, RustcDecodable, PartialEq, PartialOrd, Debug)]
pub struct param_index {
pub space: subst::ParamSpace,
pub index: uint
}
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub enum MethodOrigin<'tcx> {
// fully statically resolved method
MethodStatic(ast::DefId),
// details for a method invoked with a receiver whose type is a type parameter
// with a bounded trait.
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct MethodParam<'tcx> {
// the precise trait reference that occurs as a bound -- this may
// be a supertrait of what the user actually typed. Note that it
}
// details for a method invoked with a receiver whose type is an object
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct MethodObject<'tcx> {
// the (super)trait containing the method to be invoked
pub trait_ref: Rc<ty::TraitRef<'tcx>>,
/// needed to add to the side tables. Thus to disambiguate
/// we also keep track of whether there's an adjustment in
/// our key.
-#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub struct MethodCall {
pub expr_id: ast::NodeId,
pub adjustment: ExprAdjustment
}
-#[derive(Clone, PartialEq, Eq, Hash, Show, RustcEncodable, RustcDecodable, Copy)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug, RustcEncodable, RustcDecodable, Copy)]
pub enum ExprAdjustment {
NoAdjustment,
AutoDeref(uint),
}
}
-#[derive(Show)]
+#[derive(Debug)]
pub struct TyS<'tcx> {
pub sty: sty<'tcx>,
pub flags: TypeFlags,
ty.region_depth > depth
}
-#[derive(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub struct BareFnTy<'tcx> {
pub unsafety: ast::Unsafety,
pub abi: abi::Abi,
pub sig: PolyFnSig<'tcx>,
}
-#[derive(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub struct ClosureTy<'tcx> {
pub unsafety: ast::Unsafety,
pub abi: abi::Abi,
pub sig: PolyFnSig<'tcx>,
}
-#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub enum FnOutput<'tcx> {
FnConverging(Ty<'tcx>),
FnDiverging
}
}
-#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub struct ParamTy {
pub space: subst::ParamSpace,
pub idx: u32,
/// is the outer fn.
///
/// [dbi]: http://en.wikipedia.org/wiki/De_Bruijn_index
-#[derive(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Debug, Copy)]
pub struct DebruijnIndex {
// We maintain the invariant that this is never 0. So 1 indicates
// the innermost binder. To ensure this, create with `DebruijnIndex::new`.
}
/// Representation of regions:
-#[derive(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Debug, Copy)]
pub enum Region {
// Region bound in a type or fn declaration which will be
// substituted 'early' -- that is, at the same time when type
/// Upvars do not get their own node-id. Instead, we use the pair of
/// the original var id (that is, the root variable that is referenced
/// by the upvar) and the id of the closure expression.
-#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub struct UpvarId {
pub var_id: ast::NodeId,
pub closure_expr_id: ast::NodeId,
}
-#[derive(Clone, PartialEq, Eq, Hash, Show, RustcEncodable, RustcDecodable, Copy)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug, RustcEncodable, RustcDecodable, Copy)]
pub enum BorrowKind {
/// Data must be immutable and is aliasable.
ImmBorrow,
/// - Through mutation, the borrowed upvars can actually escape
/// the closure, so sometimes it is necessary for them to be larger
/// than the closure lifetime itself.
-#[derive(PartialEq, Clone, RustcEncodable, RustcDecodable, Show, Copy)]
+#[derive(PartialEq, Clone, RustcEncodable, RustcDecodable, Debug, Copy)]
pub struct UpvarBorrow {
pub kind: BorrowKind,
pub region: ty::Region,
}
#[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash,
- RustcEncodable, RustcDecodable, Show, Copy)]
+ RustcEncodable, RustcDecodable, Debug, Copy)]
/// A "free" region `fr` can be interpreted as "some region
/// at least as big as the scope `fr.scope`".
pub struct FreeRegion {
}
#[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash,
- RustcEncodable, RustcDecodable, Show, Copy)]
+ RustcEncodable, RustcDecodable, Debug, Copy)]
pub enum BoundRegion {
/// An anonymous region parameter for a given fn (&T)
BrAnon(u32),
// NB: If you change this, you'll probably want to change the corresponding
// AST structure in libsyntax/ast.rs as well.
-#[derive(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub enum sty<'tcx> {
ty_bool,
ty_char,
// on non-useful type error messages)
}
-#[derive(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub struct TyTrait<'tcx> {
pub principal: ty::PolyTraitRef<'tcx>,
pub bounds: ExistentialBounds<'tcx>,
/// Note that a `TraitRef` introduces a level of region binding, to
/// account for higher-ranked trait bounds like `T : for<'a> Foo<&'a
/// U>` or higher-ranked object types.
-#[derive(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub struct TraitRef<'tcx> {
pub def_id: DefId,
pub substs: &'tcx Substs<'tcx>,
/// erase, or otherwise "discharge" these bound reons, we change the
/// type from `Binder<T>` to just `T` (see
/// e.g. `liberate_late_bound_regions`).
-#[derive(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub struct Binder<T>(pub T);
#[derive(Clone, Copy, PartialEq)]
UintType(ast::UintTy),
}
-#[derive(Clone, Copy, Show)]
+#[derive(Clone, Copy, Debug)]
pub enum terr_vstore_kind {
terr_vec,
terr_str,
terr_trait
}
-#[derive(Clone, Copy, Show)]
+#[derive(Clone, Copy, Debug)]
pub struct expected_found<T> {
pub expected: T,
pub found: T
}
// Data structures used in type unification
-#[derive(Clone, Copy, Show)]
+#[derive(Clone, Copy, Debug)]
pub enum type_err<'tcx> {
terr_mismatch,
terr_unsafety_mismatch(expected_found<ast::Unsafety>),
/// Bounds suitable for a named type parameter like `A` in `fn foo<A>`
/// as well as the existential type parameter in an object type.
-#[derive(PartialEq, Eq, Hash, Clone, Show)]
+#[derive(PartialEq, Eq, Hash, Clone, Debug)]
pub struct ParamBounds<'tcx> {
pub region_bounds: Vec<ty::Region>,
pub builtin_bounds: BuiltinBounds,
/// major difference between this case and `ParamBounds` is that
/// general purpose trait bounds are omitted and there must be
/// *exactly one* region.
-#[derive(PartialEq, Eq, Hash, Clone, Show)]
+#[derive(PartialEq, Eq, Hash, Clone, Debug)]
pub struct ExistentialBounds<'tcx> {
pub region_bound: ty::Region,
pub builtin_bounds: BuiltinBounds,
pub type BuiltinBounds = EnumSet<BuiltinBound>;
#[derive(Clone, RustcEncodable, PartialEq, Eq, RustcDecodable, Hash,
- Show, Copy)]
+ Debug, Copy)]
#[repr(uint)]
pub enum BuiltinBound {
BoundSend,
FreshIntTy(u32),
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)]
pub enum UnconstrainedNumeric {
UnconstrainedFloat,
UnconstrainedInt,
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Eq, Hash, Show, Copy)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Eq, Hash, Debug, Copy)]
pub enum InferRegion {
ReVar(RegionVid),
ReSkolemized(u32, BoundRegion)
}
}
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct TypeParameterDef<'tcx> {
pub name: ast::Name,
pub def_id: ast::DefId,
pub default: Option<Ty<'tcx>>,
}
-#[derive(RustcEncodable, RustcDecodable, Clone, Show)]
+#[derive(RustcEncodable, RustcDecodable, Clone, Debug)]
pub struct RegionParameterDef {
pub name: ast::Name,
pub def_id: ast::DefId,
/// Information about the formal type/lifetime parameters associated
/// with an item or method. Analogous to ast::Generics.
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct Generics<'tcx> {
pub types: VecPerParamSpace<TypeParameterDef<'tcx>>,
pub regions: VecPerParamSpace<RegionParameterDef>,
}
}
-#[derive(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub enum Predicate<'tcx> {
/// Corresponds to `where Foo : Bar<A,B,C>`. `Foo` here would be
/// the `Self` type of the trait reference and `A`, `B`, and `C`
Projection(PolyProjectionPredicate<'tcx>),
}
-#[derive(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub struct TraitPredicate<'tcx> {
pub trait_ref: Rc<TraitRef<'tcx>>
}
}
}
-#[derive(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub struct EquatePredicate<'tcx>(pub Ty<'tcx>, pub Ty<'tcx>); // `0 == 1`
pub type PolyEquatePredicate<'tcx> = ty::Binder<EquatePredicate<'tcx>>;
-#[derive(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub struct OutlivesPredicate<A,B>(pub A, pub B); // `A : B`
pub type PolyOutlivesPredicate<A,B> = ty::Binder<OutlivesPredicate<A,B>>;
pub type PolyRegionOutlivesPredicate = PolyOutlivesPredicate<ty::Region, ty::Region>;
/// equality between arbitrary types. Processing an instance of Form
/// #2 eventually yields one of these `ProjectionPredicate`
/// instances to normalize the LHS.
-#[derive(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub struct ProjectionPredicate<'tcx> {
pub projection_ty: ProjectionTy<'tcx>,
pub ty: Ty<'tcx>,
/// Represents the projection of an associated type. In explicit UFCS
/// form this would be written `<T as Trait<..>>::N`.
-#[derive(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub struct ProjectionTy<'tcx> {
/// The trait reference `T as Trait<..>`.
pub trait_ref: Rc<ty::TraitRef<'tcx>>,
/// `[[], [U:Bar<T>]]`. Now if there were some particular reference
/// like `Foo<int,uint>`, then the `GenericBounds` would be `[[],
/// [uint:Bar<int>]]`.
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct GenericBounds<'tcx> {
pub predicates: VecPerParamSpace<Predicate<'tcx>>,
}
/// stray references in a comment or something). We try to reserve the
/// "poly" prefix to refer to higher-ranked things, as in
/// `PolyTraitRef`.
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct TypeScheme<'tcx> {
pub generics: Generics<'tcx>,
pub ty: Ty<'tcx>
pub kind: ClosureKind,
}
-#[derive(Clone, Copy, PartialEq, Eq, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Debug)]
pub enum ClosureKind {
FnClosureKind,
FnMutClosureKind,
///
/// The ordering of the cases is significant. They are sorted so that cmp::max
/// will keep the "more erroneous" of two values.
-#[derive(Copy, PartialOrd, Ord, Eq, PartialEq, Show)]
+#[derive(Copy, PartialOrd, Ord, Eq, PartialEq, Debug)]
pub enum Representability {
Representable,
ContainsRecursive,
/// The category of explicit self.
-#[derive(Clone, Copy, Eq, PartialEq, Show)]
+#[derive(Clone, Copy, Eq, PartialEq, Debug)]
pub enum ExplicitSelfCategory {
StaticExplicitSelfCategory,
ByValueExplicitSelfCategory,
EntryNone,
}
-#[derive(Copy, PartialEq, PartialOrd, Clone, Ord, Eq, Hash, Show)]
+#[derive(Copy, PartialEq, PartialOrd, Clone, Ord, Eq, Hash, Debug)]
pub enum CrateType {
CrateTypeExecutable,
CrateTypeDylib,
.collect()
}
-#[derive(Copy, Clone, PartialEq, Eq, Show)]
+#[derive(Copy, Clone, PartialEq, Eq, Debug)]
pub enum OptionStability { Stable, Unstable }
#[derive(Clone, PartialEq, Eq)]
use std::slice;
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct SearchPaths {
paths: Vec<(PathKind, Path)>,
}
iter: slice::Iter<'a, (PathKind, Path)>,
}
-#[derive(Eq, PartialEq, Clone, Copy, Show)]
+#[derive(Eq, PartialEq, Clone, Copy, Debug)]
pub enum PathKind {
Native,
Crate,
// Useful type to use with `Result<>` indicate that an error has already
// been reported to the user, so no need to continue checking.
-#[derive(Clone, Copy, Show)]
+#[derive(Clone, Copy, Debug)]
pub struct ErrorReported;
pub fn time<T, U, F>(do_it: bool, what: &str, u: U, f: F) -> T where
use syntax::ast;
use syntax::visit;
-#[derive(Clone, PartialEq, Show)]
+#[derive(Clone, PartialEq, Debug)]
pub struct Svh {
hash: String,
}
/// Everything `rustc` knows about how to compile for a specific target.
///
/// Every field here must be specified, and has no default value.
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct Target {
/// [Data layout](http://llvm.org/docs/LangRef.html#data-layout) to pass to LLVM.
pub data_layout: String,
///
/// This has an implementation of `Default`, see each field for what the default is. In general,
/// these try to take "minimal defaults" that don't assume anything about the runtime they run in.
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct TargetOptions {
/// Linker to invoke. Defaults to "cc".
pub linker: String,
/// }
/// }
///
-/// impl fmt::Show for Flags {
+/// impl fmt::Debug for Flags {
/// fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
/// write!(f, "hi!")
/// }
use std::rc::Rc;
-#[derive(Show)]
+#[derive(Debug)]
pub enum RestrictionResult<'tcx> {
Safe,
SafeIf(Rc<LoanPath<'tcx>>, Vec<Rc<LoanPath<'tcx>>>)
}
}
-#[derive(Eq, Hash, Show)]
+#[derive(Eq, Hash, Debug)]
pub struct LoanPath<'tcx> {
kind: LoanPathKind<'tcx>,
ty: ty::Ty<'tcx>,
}
}
-#[derive(PartialEq, Eq, Hash, Show)]
+#[derive(PartialEq, Eq, Hash, Debug)]
pub enum LoanPathKind<'tcx> {
LpVar(ast::NodeId), // `x` in doc.rs
LpUpvar(ty::UpvarId), // `x` captured by-value into closure
// b2b39e8700e37ad32b486b9a8409b50a8a53aa51#commitcomment-7892003
static DOWNCAST_PRINTED_OPERATOR : &'static str = " as ";
-#[derive(Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Copy, PartialEq, Eq, Hash, Debug)]
pub enum LoanPathElem {
LpDeref(mc::PointerKind), // `*LV` in doc.rs
LpInterior(mc::InteriorKind) // `LV.f` in doc.rs
BorrowViolation(euv::LoanCause)
}
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub enum MovedValueUseKind {
MovedInUse,
MovedInCapture,
}
/// Index into `MoveData.paths`, used like a pointer
-#[derive(Copy, PartialEq, Eq, PartialOrd, Ord, Show)]
+#[derive(Copy, PartialEq, Eq, PartialOrd, Ord, Debug)]
pub struct MovePathIndex(uint);
impl MovePathIndex {
pub next_sibling: MovePathIndex,
}
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub enum MoveKind {
Declared, // When declared, variables start out "moved".
MoveExpr, // Expression or binding that moves a variable
use std::rc::Rc;
use std::borrow::IntoCow;
-#[derive(Show, Copy)]
+#[derive(Debug, Copy)]
pub enum Variant {
Loans,
Moves,
use std::option;
use std::str::FromStr;
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub enum PpSourceMode {
PpmNormal,
PpmEveryBodyLoops,
}
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub enum PpFlowGraphMode {
Default,
/// Drops the labels from the edges in the flowgraph output. This
/// have become a pain to maintain.
UnlabelledEdges,
}
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub enum PpMode {
PpmSource(PpSourceMode),
PpmFlowGraph(PpFlowGraphMode),
variants
}
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub enum UserIdentifiedItem {
ItemViaNode(ast::NodeId),
ItemViaPath(Vec<String>),
}
#[repr(C)]
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub enum DiagnosticSeverity {
Error,
Warning,
// The LLVM TypeKind type - must stay in sync with the def of
// LLVMTypeKind in llvm/include/llvm-c/Core.h
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
#[repr(C)]
pub enum TypeKind {
Void = 0,
ArgumentIrrefutableMode,
}
-#[derive(Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Copy, PartialEq, Eq, Hash, Debug)]
enum Namespace {
TypeNS,
ValueNS
}
/// Contains data for specific types of import directives.
-#[derive(Copy,Show)]
+#[derive(Copy,Debug)]
enum ImportDirectiveSubclass {
SingleImport(Name /* target */, Name /* source */),
GlobImport
// The rib kind controls the translation of local
// definitions (`DefLocal`) to upvars (`DefUpvar`).
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
enum RibKind {
// No translation needs to be applied.
NormalRibKind,
}
// Methods can be required or provided. RequiredMethod methods only occur in traits.
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
enum MethodSort {
RequiredMethod,
ProvidedMethod(NodeId)
}
/// One local scope.
-#[derive(Show)]
+#[derive(Debug)]
struct Rib {
bindings: HashMap<Name, DefLike>,
kind: RibKind,
}
/// Whether an import can be shadowed by another import.
-#[derive(Show,PartialEq,Clone,Copy)]
+#[derive(Debug,PartialEq,Clone,Copy)]
enum Shadowable {
Always,
Never
}
/// One import directive.
-#[derive(Show)]
+#[derive(Debug)]
struct ImportDirective {
module_path: Vec<Name>,
subclass: ImportDirectiveSubclass,
}
/// The item that an import resolves to.
-#[derive(Clone,Show)]
+#[derive(Clone,Debug)]
struct Target {
target_module: Rc<Module>,
bindings: Rc<NameBindings>,
}
/// An ImportResolution represents a particular `use` directive.
-#[derive(Show)]
+#[derive(Debug)]
struct ImportResolution {
/// Whether this resolution came from a `use` or a `pub use`. Note that this
/// should *not* be used whenever resolution is being performed, this is
}
/// The link from a module up to its nearest parent node.
-#[derive(Clone,Show)]
+#[derive(Clone,Debug)]
enum ParentLink {
NoParentLink,
ModuleParentLink(Weak<Module>, Name),
}
/// The type of module this is.
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
enum ModuleKind {
NormalModuleKind,
TraitModuleKind,
}
bitflags! {
- #[derive(Show)]
+ #[derive(Debug)]
flags DefModifiers: u8 {
const PUBLIC = 0b0000_0001,
const IMPORTABLE = 0b0000_0010,
}
// Records a possibly-private type definition.
-#[derive(Clone,Show)]
+#[derive(Clone,Debug)]
struct TypeNsDef {
modifiers: DefModifiers, // see note in ImportResolution about how to use this
module_def: Option<Rc<Module>>,
}
// Records a possibly-private value definition.
-#[derive(Clone, Copy, Show)]
+#[derive(Clone, Copy, Debug)]
struct ValueNsDef {
modifiers: DefModifiers, // see note in ImportResolution about how to use this
def: Def,
// Records the definitions (at most one for each namespace) that a name is
// bound to.
-#[derive(Show)]
+#[derive(Debug)]
struct NameBindings {
type_def: RefCell<Option<TypeNsDef>>, //< Meaning in type namespace.
value_def: RefCell<Option<ValueNsDef>>, //< Meaning in value namespace.
})
}
-#[derive(Copy,Show)]
+#[derive(Copy,Debug)]
pub enum Row {
Variable,
Enum,
use syntax::fold::Folder;
use syntax::ptr::P;
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
struct ConstantExpr<'a>(&'a ast::Expr);
impl<'a> ConstantExpr<'a> {
}
// An option identifying a branch (either a literal, an enum variant or a range)
-#[derive(Show)]
+#[derive(Debug)]
enum Opt<'a, 'tcx> {
ConstantValue(ConstantExpr<'a>),
ConstantRange(ConstantExpr<'a>, ConstantExpr<'a>),
type Hint = attr::ReprAttr;
/// Representations.
-#[derive(Eq, PartialEq, Show)]
+#[derive(Eq, PartialEq, Debug)]
pub enum Repr<'tcx> {
/// C-like enums; basically an int.
CEnum(IntType, Disr, Disr), // discriminant range (signedness based on the IntType)
}
/// For structs, and struct-like parts of anything fancier.
-#[derive(Eq, PartialEq, Show)]
+#[derive(Eq, PartialEq, Debug)]
pub struct Struct<'tcx> {
// If the struct is DST, then the size and alignment do not take into
// account the unsized fields of the struct.
}
}
-#[derive(Show)]
+#[derive(Debug)]
struct IntBounds {
slo: i64,
shi: i64,
cached_landing_pad: Option<BasicBlockRef>,
}
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub struct CustomScopeIndex {
index: uint
}
}
}
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub enum EarlyExitLabel {
UnwindExit,
ReturnExit,
pub type CleanupObj<'tcx> = Box<Cleanup<'tcx>+'tcx>;
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub enum ScopeId {
AstScope(ast::NodeId),
CustomScope(CustomScopeIndex)
}
}
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub enum Heap {
HeapExchange
}
}
// Key used to lookup values supplied for type parameters in an expr.
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub enum ExprOrMethodCall {
// Type parameters for a path like `None::<int>`
ExprId(ast::NodeId),
pub datum: Datum<'tcx, K>,
}
-#[derive(Show)]
+#[derive(Debug)]
pub enum Expr {
/// a fresh value that was produced and which has no cleanup yet
/// because it has not yet "landed" into its permanent home
LvalueExpr,
}
-#[derive(Clone, Copy, Show)]
+#[derive(Clone, Copy, Debug)]
pub struct Lvalue;
-#[derive(Show)]
+#[derive(Debug)]
pub struct Rvalue {
pub mode: RvalueMode
}
fn drop(&mut self) { }
}
-#[derive(Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Copy, PartialEq, Eq, Hash, Debug)]
pub enum RvalueMode {
/// `val` is a pointer to the actual value (and thus has type *T)
ByRef,
// Public Interface of debuginfo module
//=-----------------------------------------------------------------------------
-#[derive(Copy, Show, Hash, Eq, PartialEq, Clone)]
+#[derive(Copy, Debug, Hash, Eq, PartialEq, Clone)]
struct UniqueTypeId(ast::Name);
// The TypeMap is where the CrateDebugContext holds the type metadata nodes
} else { llsrc };
}
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub enum cast_kind {
cast_pointer,
cast_integral,
(lldecl, mono_ty, true)
}
-#[derive(PartialEq, Eq, Hash, Show)]
+#[derive(PartialEq, Eq, Hash, Debug)]
pub struct MonoId<'tcx> {
pub def: ast::DefId,
pub params: subst::VecPerParamSpace<Ty<'tcx>>
use libc::c_uint;
-#[derive(Clone, Copy, PartialEq, Show)]
+#[derive(Clone, Copy, PartialEq, Debug)]
#[repr(C)]
pub struct Type {
rf: TypeRef
pub kind: PickKind<'tcx>,
}
-#[derive(Clone,Show)]
+#[derive(Clone,Debug)]
pub enum PickKind<'tcx> {
InherentImplPick(/* Impl */ ast::DefId),
ObjectPick(/* Trait */ ast::DefId, /* method_num */ uint, /* real_index */ uint),
// difference is that it doesn't embed any regions or other
// specifics. The "confirmation" step recreates those details as
// needed.
-#[derive(Clone,Show)]
+#[derive(Clone,Debug)]
pub enum PickAdjustment {
// Indicates that the source expression should be autoderef'd N times
//
}
}
-#[derive(Copy, Show, PartialEq, Eq)]
+#[derive(Copy, Debug, PartialEq, Eq)]
pub enum LvaluePreference {
PreferMutLvalue,
NoPreference
type VarianceTermPtr<'a> = &'a VarianceTerm<'a>;
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
struct InferredIndex(uint);
#[derive(Copy)]
inferred_infos: Vec<InferredInfo<'a>> ,
}
-#[derive(Copy, Show, PartialEq)]
+#[derive(Copy, Debug, PartialEq)]
enum ParamKind {
TypeParam,
RegionParam
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct Crate {
pub name: String,
pub src: FsPath,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct ExternalCrate {
pub name: String,
pub attrs: Vec<Attribute>,
/// Anything with a source location and set of attributes and, optionally, a
/// name. That is, anything that can be documented. This doesn't correspond
/// directly to the AST's concept of an item; it's a strict superset.
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct Item {
/// Stringified span
pub source: Span,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub enum ItemEnum {
ExternCrateItem(String, Option<String>),
ImportItem(Import),
AssociatedTypeItem(TyParam),
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct Module {
pub items: Vec<Item>,
pub is_crate: bool,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
pub enum Attribute {
Word(String),
List(String, Vec<Attribute> ),
fn span(&self) -> codemap::Span { unimplemented!() }
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
pub struct TyParam {
pub name: String,
pub did: ast::DefId,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
pub enum TyParamBound {
RegionBound(Lifetime),
TraitBound(PolyTrait, ast::TraitBoundModifier)
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
pub struct Lifetime(String);
impl Lifetime {
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
pub enum WherePredicate {
BoundPredicate { ty: Type, bounds: Vec<TyParamBound> },
RegionPredicate { lifetime: Lifetime, bounds: Vec<Lifetime>},
}
// maybe use a Generic enum and use ~[Generic]?
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
pub struct Generics {
pub lifetimes: Vec<Lifetime>,
pub type_params: Vec<TyParam>,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct Method {
pub generics: Generics,
pub self_: SelfTy,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct TyMethod {
pub unsafety: ast::Unsafety,
pub decl: FnDecl,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
pub enum SelfTy {
SelfStatic,
SelfValue,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct Function {
pub decl: FnDecl,
pub generics: Generics,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
pub struct FnDecl {
pub inputs: Arguments,
pub output: FunctionRetTy,
pub attrs: Vec<Attribute>,
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
pub struct Arguments {
pub values: Vec<Argument>,
}
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
pub struct Argument {
pub type_: Type,
pub name: String,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
pub enum FunctionRetTy {
Return(Type),
DefaultReturn,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct Trait {
pub unsafety: ast::Unsafety,
pub items: Vec<TraitMethod>,
/// An item belonging to a trait, whether a method or associated. Could be named
/// TraitItem except that's already taken by an exported enum variant.
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub enum TraitMethod {
RequiredMethod(Item),
ProvidedMethod(Item),
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub enum ImplMethod {
MethodImplItem(Item),
TypeImplItem(Item),
}
/// A trait reference, which may have higher ranked lifetimes.
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
pub struct PolyTrait {
pub trait_: Type,
pub lifetimes: Vec<Lifetime>
/// A representation of a Type suitable for hyperlinking purposes. Ideally one can get the original
/// type out of the AST/ty::ctxt given one of these, if more information is needed. Most importantly
/// it does not preserve mutability or boxes.
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
pub enum Type {
/// structs/enums/traits (anything that'd be an ast::TyPath)
ResolvedPath {
PolyTraitRef(Vec<TyParamBound>),
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Copy, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Copy, Debug)]
pub enum PrimitiveType {
Isize, I8, I16, I32, I64,
Usize, U8, U16, U32, U64,
PrimitiveTuple,
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Copy, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Copy, Debug)]
pub enum TypeKind {
TypeEnum,
TypeFunction,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub enum StructField {
HiddenStructField, // inserted later by strip passes
TypedStructField(Type),
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct Struct {
pub struct_type: doctree::StructType,
pub generics: Generics,
/// This is a more limited form of the standard Struct, different in that
/// it lacks the things most items have (name, id, parameterization). Found
/// only as a variant in an enum.
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct VariantStruct {
pub struct_type: doctree::StructType,
pub fields: Vec<Item>,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct Enum {
pub variants: Vec<Item>,
pub generics: Generics,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct Variant {
pub kind: VariantKind,
}
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub enum VariantKind {
CLikeVariant,
TupleVariant(Vec<Type>),
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct Span {
pub filename: String,
pub loline: uint,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
pub struct Path {
pub global: bool,
pub segments: Vec<PathSegment>,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
pub enum PathParameters {
AngleBracketed {
lifetimes: Vec<Lifetime>,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
pub struct PathSegment {
pub name: String,
pub params: PathParameters
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct Typedef {
pub type_: Type,
pub generics: Generics,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug)]
pub struct BareFunctionDecl {
pub unsafety: ast::Unsafety,
pub generics: Generics,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct Static {
pub type_: Type,
pub mutability: Mutability,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct Constant {
pub type_: Type,
pub expr: String,
}
}
-#[derive(Show, Clone, RustcEncodable, RustcDecodable, PartialEq, Copy)]
+#[derive(Debug, Clone, RustcEncodable, RustcDecodable, PartialEq, Copy)]
pub enum Mutability {
Mutable,
Immutable,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Copy, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Copy, Debug)]
pub enum ImplPolarity {
Positive,
Negative,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct Impl {
pub generics: Generics,
pub trait_: Option<Type>,
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub enum Import {
// use source as str;
SimpleImport(String, ImportSource),
ImportList(ImportSource, Vec<ViewListIdent>),
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct ImportSource {
pub path: Path,
pub did: Option<ast::DefId>,
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct ViewListIdent {
pub name: String,
pub source: Option<ast::DefId>,
})
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct Macro {
pub source: String,
}
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct Stability {
pub level: attr::StabilityLevel,
pub feature: String,
}
/// An equality constraint on an associated type, e.g. `A=Bar` in `Foo<A=Bar>`
-#[derive(Clone, PartialEq, RustcDecodable, RustcEncodable, Show)]
+#[derive(Clone, PartialEq, RustcDecodable, RustcEncodable, Debug)]
pub struct TypeBinding {
pub name: String,
pub ty: Type
}
}
-#[derive(Show, Clone, RustcEncodable, RustcDecodable, Copy)]
+#[derive(Debug, Clone, RustcEncodable, RustcDecodable, Copy)]
pub enum StructType {
/// A normal struct
Plain,
pub stab: Option<attr::Stability>,
}
-#[derive(Show)]
+#[derive(Debug)]
pub struct Static {
pub type_: P<ast::Ty>,
pub mutability: ast::Mutability,
}
}
-#[derive(Eq, PartialEq, Clone, Show)]
+#[derive(Eq, PartialEq, Clone, Debug)]
struct LangString {
should_fail: bool,
no_run: bool,
}
/// Errors that can occur when decoding a hex encoded string
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub enum FromHexError {
/// The input contained a character not part of the hex format
InvalidHexCharacter(char, uint),
use Encodable;
/// Represents a json value
-#[derive(Clone, PartialEq, PartialOrd, Show)]
+#[derive(Clone, PartialEq, PartialOrd, Debug)]
pub enum Json {
I64(i64),
U64(u64),
pub struct AsPrettyJson<'a, T: 'a> { inner: &'a T, indent: Option<uint> }
/// The errors that can arise while parsing a JSON stream.
-#[derive(Clone, Copy, PartialEq, Show)]
+#[derive(Clone, Copy, PartialEq, Debug)]
pub enum ErrorCode {
InvalidSyntax,
InvalidNumber,
NotUtf8,
}
-#[derive(Clone, Copy, PartialEq, Show)]
+#[derive(Clone, Copy, PartialEq, Debug)]
pub enum ParserError {
/// msg, line, col
SyntaxError(ErrorCode, uint, uint),
// Builder and Parser have the same errors.
pub type BuilderError = ParserError;
-#[derive(Clone, PartialEq, Show)]
+#[derive(Clone, PartialEq, Debug)]
pub enum DecoderError {
ParseError(ParserError),
ExpectedError(string::String, string::String),
ApplicationError(string::String)
}
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub enum EncoderError {
FmtError(fmt::Error),
BadHashmapKey,
}
/// The output of the streaming parser.
-#[derive(PartialEq, Clone, Show)]
+#[derive(PartialEq, Clone, Debug)]
pub enum JsonEvent {
ObjectStart,
ObjectEnd,
Error(ParserError),
}
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
enum ParserState {
// Parse a value in an array, true means first element.
ParseArray(bool),
/// For example, StackElement::Key("foo"), StackElement::Key("bar"),
/// StackElement::Index(3) and StackElement::Key("x") are the
/// StackElements compositing the stack that represents foo.bar[3].x
-#[derive(PartialEq, Clone, Show)]
+#[derive(PartialEq, Clone, Debug)]
pub enum StackElement<'l> {
Index(u32),
Key(&'l str),
// Internally, Key elements are stored as indices in a buffer to avoid
// allocating a string for every member of an object.
-#[derive(PartialEq, Clone, Show)]
+#[derive(PartialEq, Clone, Debug)]
enum InternalStackElement {
InternalIndex(u32),
InternalKey(u16, u16), // start, size
use std::num::Float;
use std::string;
- #[derive(RustcDecodable, Eq, PartialEq, Show)]
+ #[derive(RustcDecodable, Eq, PartialEq, Debug)]
struct OptionData {
opt: Option<uint>,
}
ExpectedError("Number".to_string(), "false".to_string()));
}
- #[derive(PartialEq, RustcEncodable, RustcDecodable, Show)]
+ #[derive(PartialEq, RustcEncodable, RustcDecodable, Debug)]
enum Animal {
Dog,
Frog(string::String, int)
}
- #[derive(PartialEq, RustcEncodable, RustcDecodable, Show)]
+ #[derive(PartialEq, RustcEncodable, RustcDecodable, Debug)]
struct Inner {
a: (),
b: uint,
c: Vec<string::String>,
}
- #[derive(PartialEq, RustcEncodable, RustcDecodable, Show)]
+ #[derive(PartialEq, RustcEncodable, RustcDecodable, Debug)]
struct Outer {
inner: Vec<Inner>,
}
test_checked_next_power_of_two! { test_checked_next_power_of_two_u64, u64 }
test_checked_next_power_of_two! { test_checked_next_power_of_two_uint, uint }
- #[derive(PartialEq, Show)]
+ #[derive(PartialEq, Debug)]
struct Value { x: int }
impl ToPrimitive for Value {
/// # FIXME
///
/// Is something like this sufficient? It's kind of archaic
-#[derive(PartialEq, Eq, Clone, Show)]
+#[derive(PartialEq, Eq, Clone, Debug)]
pub struct IoError {
/// An enumeration which can be matched against for determining the flavor
/// of error.
}
/// A list specifying general categories of I/O error.
-#[derive(Copy, PartialEq, Eq, Clone, Show)]
+#[derive(Copy, PartialEq, Eq, Clone, Debug)]
pub enum IoErrorKind {
/// Any I/O error not part of this list.
OtherIoError,
/// A mode specifies how a file should be opened or created. These modes are
/// passed to `File::open_mode` and are used to control where the file is
/// positioned when it is initially opened.
-#[derive(Copy, Clone, PartialEq, Eq, Show)]
+#[derive(Copy, Clone, PartialEq, Eq, Debug)]
pub enum FileMode {
/// Opens a file positioned at the beginning.
Open,
/// Access permissions with which the file should be opened. `File`s
/// opened with `Read` will return an error if written to.
-#[derive(Copy, Clone, PartialEq, Eq, Show)]
+#[derive(Copy, Clone, PartialEq, Eq, Debug)]
pub enum FileAccess {
/// Read-only access, requests to write will result in an error
Read,
}
/// Different kinds of files which can be identified by a call to stat
-#[derive(Copy, PartialEq, Show, Hash, Clone)]
+#[derive(Copy, PartialEq, Debug, Hash, Clone)]
pub enum FileType {
/// This is a normal file, corresponding to `S_IFREG`
RegularFile,
bitflags! {
/// A set of permissions for a file or directory is represented by a set of
/// flags which are or'd together.
- #[derive(Show)]
+ #[derive(Debug)]
flags FilePermission: u32 {
const USER_READ = 0o400,
const USER_WRITE = 0o200,
use prelude::v1::{Ok, Vec, Buffer, SliceExt};
use uint;
- #[derive(Clone, PartialEq, Show)]
+ #[derive(Clone, PartialEq, Debug)]
enum BadReaderBehavior {
GoodBehavior(uint),
BadBehavior(uint)
use vec::Vec;
/// Hints to the types of sockets that are desired when looking up hosts
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub enum SocketType {
Stream, Datagram, Raw
}
/// to manipulate how a query is performed.
///
/// The meaning of each of these flags can be found with `man -s 3 getaddrinfo`
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub enum Flag {
AddrConfig,
All,
/// A transport protocol associated with either a hint or a return value of
/// `lookup`
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub enum Protocol {
TCP, UDP
}
///
/// For details on these fields, see their corresponding definitions via
/// `man -s 3 getaddrinfo`
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub struct Hint {
pub family: uint,
pub socktype: Option<SocketType>,
pub flags: uint,
}
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub struct Info {
pub address: SocketAddr,
pub family: uint,
pub type Port = u16;
-#[derive(Copy, PartialEq, Eq, Clone, Hash, Show)]
+#[derive(Copy, PartialEq, Eq, Clone, Hash, Debug)]
pub enum IpAddr {
Ipv4Addr(u8, u8, u8, u8),
Ipv6Addr(u16, u16, u16, u16, u16, u16, u16, u16)
}
}
-#[derive(Copy, PartialEq, Eq, Clone, Hash, Show)]
+#[derive(Copy, PartialEq, Eq, Clone, Hash, Debug)]
pub struct SocketAddr {
pub ip: IpAddr,
pub port: Port,
/// A representation of environment variable name
/// It compares case-insensitive on Windows and case-sensitive everywhere else.
#[cfg(not(windows))]
-#[derive(Hash, PartialEq, Eq, Clone, Show)]
+#[derive(Hash, PartialEq, Eq, Clone, Debug)]
struct EnvKey(CString);
#[doc(hidden)]
#[cfg(windows)]
-#[derive(Eq, Clone, Show)]
+#[derive(Eq, Clone, Debug)]
struct EnvKey(CString);
#[cfg(windows)]
/// Describes the result of a process after it has terminated.
/// Note that Windows have no signals, so the result is usually ExitStatus.
-#[derive(PartialEq, Eq, Clone, Copy, Show)]
+#[derive(PartialEq, Eq, Clone, Copy, Debug)]
pub enum ProcessExit {
/// Normal termination with an exit status.
ExitStatus(int),
use slice::bytes::MutableByteVector;
/// Wraps a `Reader`, limiting the number of bytes that can be read from it.
-#[derive(Show)]
+#[derive(Debug)]
pub struct LimitReader<R> {
limit: uint,
inner: R
}
/// A `Writer` which ignores bytes written to it, like /dev/null.
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub struct NullWriter;
impl Writer for NullWriter {
}
/// A `Reader` which returns an infinite stream of 0 bytes, like /dev/zero.
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub struct ZeroReader;
impl Reader for ZeroReader {
}
/// A `Reader` which is always at EOF, like /dev/null.
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub struct NullReader;
impl Reader for NullReader {
///
/// The `Writer`s are delegated to in order. If any `Writer` returns an error,
/// that error is returned immediately and remaining `Writer`s are not called.
-#[derive(Show)]
+#[derive(Debug)]
pub struct MultiWriter<W> {
writers: Vec<W>
}
/// A `Reader` which chains input from multiple `Reader`s, reading each to
/// completion before moving onto the next.
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct ChainedReader<I, R> {
readers: I,
cur_reader: Option<R>,
/// A `Reader` which forwards input from another `Reader`, passing it along to
/// a `Writer` as well. Similar to the `tee(1)` command.
-#[derive(Show)]
+#[derive(Debug)]
pub struct TeeReader<R, W> {
reader: R,
writer: W,
}
/// An adaptor converting an `Iterator<u8>` to a `Reader`.
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct IterReader<T> {
iter: T,
}
}
/// Possible errors when creating a map.
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub enum MapError {
/// # The following are POSIX-specific
///
}
/// Prefix types for Path
-#[derive(Copy, PartialEq, Clone, Show)]
+#[derive(Copy, PartialEq, Clone, Debug)]
pub enum PathPrefix {
/// Prefix `\\?\`, uint is the length of the following component
VerbatimPrefix(uint),
///
/// The `recv` operation can only fail if the sending half of a channel is
/// disconnected, implying that no further messages will ever be received.
-#[derive(PartialEq, Eq, Clone, Copy, Show)]
+#[derive(PartialEq, Eq, Clone, Copy, Debug)]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct RecvError;
/// This enumeration is the list of the possible reasons that try_recv could not
/// return data when called.
-#[derive(PartialEq, Clone, Copy, Show)]
+#[derive(PartialEq, Clone, Copy, Debug)]
#[stable(feature = "rust1", since = "1.0.0")]
pub enum TryRecvError {
/// This channel is currently empty, but the sender(s) have not yet
size: uint,
}
-#[derive(Show)]
+#[derive(Debug)]
pub enum Failure {
Empty,
Disconnected,
// FIXME: move uses of Arc and deadline tracking to std::io
-#[derive(Show)]
+#[derive(Debug)]
pub enum SocketStatus {
Readable,
Writable,
/// ISO 8601 time duration with nanosecond precision.
/// This also allows for the negative duration; see individual methods for details.
-#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug)]
pub struct Duration {
secs: i64,
nanos: i32, // Always 0 <= nanos < NANOS_PER_SEC
use std::fmt;
-#[derive(Copy, PartialEq, Eq, Show)]
+#[derive(Copy, PartialEq, Eq, Debug)]
pub enum Os {
OsWindows,
OsMacos,
OsDragonfly,
}
-#[derive(PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Clone, Copy, Show)]
+#[derive(PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Clone, Copy, Debug)]
pub enum Abi {
// NB: This ordering MUST match the AbiDatas array below.
// (This is ensured by the test indices_are_correct().)
}
#[allow(non_camel_case_types)]
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub enum Architecture {
X86,
X86_64,
pub type FnIdent = Option<Ident>;
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash,
- Show, Copy)]
+ Debug, Copy)]
pub struct Lifetime {
pub id: NodeId,
pub span: Span,
pub name: Name
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct LifetimeDef {
pub lifetime: Lifetime,
pub bounds: Vec<Lifetime>
/// A "Path" is essentially Rust's notion of a name; for instance:
/// std::cmp::PartialEq . It's represented as a sequence of identifiers,
/// along with a bunch of supporting information.
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Path {
pub span: Span,
/// A `::foo` path, is relative to the crate root rather than current
/// A segment of a path: an identifier, an optional lifetime, and a set of
/// types.
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct PathSegment {
/// The identifier portion of this path segment.
pub identifier: Ident,
pub parameters: PathParameters,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum PathParameters {
AngleBracketedParameters(AngleBracketedParameterData),
ParenthesizedParameters(ParenthesizedParameterData),
}
/// A path like `Foo<'a, T>`
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct AngleBracketedParameterData {
/// The lifetime parameters for this path segment.
pub lifetimes: Vec<Lifetime>,
}
/// A path like `Foo(A,B) -> C`
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct ParenthesizedParameterData {
/// Overall span
pub span: Span,
pub type NodeId = u32;
#[derive(Clone, Eq, Ord, PartialOrd, PartialEq, RustcEncodable,
- RustcDecodable, Hash, Show, Copy)]
+ RustcDecodable, Hash, Debug, Copy)]
pub struct DefId {
pub krate: CrateNum,
pub node: NodeId,
/// typeck::collect::compute_bounds matches these against
/// the "special" built-in traits (see middle::lang_items) and
/// detects Copy, Send and Sync.
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum TyParamBound {
TraitTyParamBound(PolyTraitRef, TraitBoundModifier),
RegionTyParamBound(Lifetime)
/// A modifier on a bound, currently this is only used for `?Sized`, where the
/// modifier is `Maybe`. Negative bounds should also be handled here.
-#[derive(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum TraitBoundModifier {
None,
Maybe,
pub type TyParamBounds = OwnedSlice<TyParamBound>;
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct TyParam {
pub ident: Ident,
pub id: NodeId,
/// Represents lifetimes and type parameters attached to a declaration
/// of a function, enum, trait, etc.
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Generics {
pub lifetimes: Vec<LifetimeDef>,
pub ty_params: OwnedSlice<TyParam>,
}
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct WhereClause {
pub id: NodeId,
pub predicates: Vec<WherePredicate>,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum WherePredicate {
BoundPredicate(WhereBoundPredicate),
RegionPredicate(WhereRegionPredicate),
EqPredicate(WhereEqPredicate)
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct WhereBoundPredicate {
pub span: Span,
pub bounded_ty: P<Ty>,
pub bounds: OwnedSlice<TyParamBound>,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct WhereRegionPredicate {
pub span: Span,
pub lifetime: Lifetime,
pub bounds: Vec<Lifetime>,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct WhereEqPredicate {
pub id: NodeId,
pub span: Span,
/// used to drive conditional compilation
pub type CrateConfig = Vec<P<MetaItem>> ;
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Crate {
pub module: Mod,
pub attrs: Vec<Attribute>,
pub type MetaItem = Spanned<MetaItem_>;
-#[derive(Clone, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum MetaItem_ {
MetaWord(InternedString),
MetaList(InternedString, Vec<P<MetaItem>>),
}
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Block {
pub stmts: Vec<P<Stmt>>,
pub expr: Option<P<Expr>>,
pub span: Span,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Pat {
pub id: NodeId,
pub node: Pat_,
pub span: Span,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct FieldPat {
pub ident: Ident,
pub pat: P<Pat>,
pub is_shorthand: bool,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum BindingMode {
BindByRef(Mutability),
BindByValue(Mutability),
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum PatWildKind {
/// Represents the wildcard pattern `_`
PatWildSingle,
PatWildMulti,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum Pat_ {
/// Represents a wildcard pattern (either `_` or `..`)
PatWild(PatWildKind),
PatMac(Mac),
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum Mutability {
MutMutable,
MutImmutable,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum BinOp_ {
BiAdd,
BiSub,
pub type BinOp = Spanned<BinOp_>;
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum UnOp {
UnUniq,
UnDeref,
pub type Stmt = Spanned<Stmt_>;
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum Stmt_ {
/// Could be an item or a local (let) binding:
StmtDecl(P<Decl>, NodeId),
StmtMac(P<Mac>, MacStmtStyle),
}
-#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum MacStmtStyle {
/// The macro statement had a trailing semicolon, e.g. `foo! { ... };`
/// `foo!(...);`, `foo![...];`
/// Where a local declaration came from: either a true `let ... =
/// ...;`, or one desugared from the pattern of a for loop.
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum LocalSource {
LocalLet,
LocalFor,
// FIXME (pending discussion of #1697, #2178...): local should really be
// a refinement on pat.
/// Local represents a `let` statement, e.g., `let <pat>:<ty> = <expr>;`
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Local {
pub pat: P<Pat>,
pub ty: Option<P<Ty>>,
pub type Decl = Spanned<Decl_>;
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum Decl_ {
/// A local (let) binding:
DeclLocal(P<Local>),
}
/// represents one arm of a 'match'
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Arm {
pub attrs: Vec<Attribute>,
pub pats: Vec<P<Pat>>,
pub body: P<Expr>,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Field {
pub ident: SpannedIdent,
pub expr: P<Expr>,
pub type SpannedIdent = Spanned<Ident>;
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum BlockCheckMode {
DefaultBlock,
UnsafeBlock(UnsafeSource),
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum UnsafeSource {
CompilerGenerated,
UserProvided,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Expr {
pub id: NodeId,
pub node: Expr_,
pub span: Span,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum Expr_ {
/// First expr is the place; second expr is the value.
ExprBox(Option<P<Expr>>, P<Expr>),
/// <Vec<T> as SomeTrait>::SomeAssociatedItem
/// ^~~~~ ^~~~~~~~~ ^~~~~~~~~~~~~~~~~~
/// self_type trait_name item_path
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct QPath {
pub self_type: P<Ty>,
pub trait_ref: P<TraitRef>,
pub item_path: PathSegment,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum MatchSource {
Normal,
IfLetDesugar { contains_else_clause: bool },
WhileLetDesugar,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum CaptureClause {
CaptureByValue,
CaptureByRef,
}
/// A delimited sequence of token trees
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Delimited {
/// The type of delimiter
pub delim: token::DelimToken,
}
/// A sequence of token treesee
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct SequenceRepetition {
/// The sequence of token trees
pub tts: Vec<TokenTree>,
/// A Kleene-style [repetition operator](http://en.wikipedia.org/wiki/Kleene_star)
/// for token sequences.
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum KleeneOp {
ZeroOrMore,
OneOrMore,
///
/// The RHS of an MBE macro is the only place `SubstNt`s are substituted.
/// Nothing special happens to misnamed or misplaced `SubstNt`s.
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
#[doc="For macro invocations; parsing is delegated to the macro"]
pub enum TokenTree {
/// A single token
/// is being invoked, and the vector of token-trees contains the source
/// of the macro invocation.
/// There's only one flavor, now, so this could presumably be simplified.
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum Mac_ {
// NB: the additional ident for a macro_rules-style macro is actually
// stored in the enclosing item. Oog.
MacInvocTT(Path, Vec<TokenTree>, SyntaxContext), // new macro-invocation
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum StrStyle {
CookedStr,
RawStr(usize)
pub type Lit = Spanned<Lit_>;
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum Sign {
Minus,
Plus
}
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum LitIntType {
SignedIntLit(IntTy, Sign),
UnsignedIntLit(UintTy),
}
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum Lit_ {
LitStr(InternedString, StrStyle),
LitBinary(Rc<Vec<u8>>),
// NB: If you change this, you'll probably want to change the corresponding
// type structure in middle/ty.rs as well.
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct MutTy {
pub ty: P<Ty>,
pub mutbl: Mutability,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct TypeField {
pub ident: Ident,
pub mt: MutTy,
/// Represents a required method in a trait declaration,
/// one without a default implementation
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct TypeMethod {
pub ident: Ident,
pub attrs: Vec<Attribute>,
/// a default implementation A trait method is either required (meaning it
/// doesn't have an implementation, just a signature) or provided (meaning it
/// has a default implementation).
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum TraitItem {
RequiredMethod(TypeMethod),
ProvidedMethod(P<Method>),
TypeTraitItem(P<AssociatedType>),
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum ImplItem {
MethodImplItem(P<Method>),
TypeImplItem(P<Typedef>),
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct AssociatedType {
pub attrs: Vec<Attribute>,
pub ty_param: TyParam,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Typedef {
pub id: NodeId,
pub span: Span,
}
// Bind a type to an associated type: `A=Foo`.
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct TypeBinding {
pub id: NodeId,
pub ident: Ident,
// NB PartialEq method appears below.
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Ty {
pub id: NodeId,
pub node: Ty_,
}
/// Not represented directly in the AST, referred to by name through a ty_path.
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum PrimTy {
TyInt(IntTy),
TyUint(UintTy),
TyChar
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct BareFnTy {
pub unsafety: Unsafety,
pub abi: Abi,
pub decl: P<FnDecl>
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
/// The different kinds of types recognized by the compiler
pub enum Ty_ {
TyVec(P<Ty>),
TyInfer,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum AsmDialect {
AsmAtt,
AsmIntel
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct InlineAsm {
pub asm: InternedString,
pub asm_str_style: StrStyle,
}
/// represents an argument in a function header
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Arg {
pub ty: P<Ty>,
pub pat: P<Pat>,
}
/// represents the header (not the body) of a function declaration
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct FnDecl {
pub inputs: Vec<Arg>,
pub output: FunctionRetTy,
pub variadic: bool
}
-#[derive(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum Unsafety {
Unsafe,
Normal,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum FunctionRetTy {
/// Functions with return type ! that always
/// raise an error or exit (i.e. never return to the caller)
}
/// Represents the kind of 'self' associated with a method
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum ExplicitSelf_ {
/// No self
SelfStatic,
pub type ExplicitSelf = Spanned<ExplicitSelf_>;
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Method {
pub attrs: Vec<Attribute>,
pub id: NodeId,
pub node: Method_,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum Method_ {
/// Represents a method declaration
MethDecl(Ident,
MethMac(Mac),
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Mod {
/// A span from the first token past `{` to the last token until `}`.
/// For `mod foo;`, the inner span ranges from the first token
pub items: Vec<P<Item>>,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct ForeignMod {
pub abi: Abi,
pub items: Vec<P<ForeignItem>>,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct VariantArg {
pub ty: P<Ty>,
pub id: NodeId,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum VariantKind {
TupleVariantKind(Vec<VariantArg>),
StructVariantKind(P<StructDef>),
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct EnumDef {
pub variants: Vec<P<Variant>>,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Variant_ {
pub name: Ident,
pub attrs: Vec<Attribute>,
pub type Variant = Spanned<Variant_>;
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum PathListItem_ {
PathListIdent { name: Ident, id: NodeId },
PathListMod { id: NodeId }
pub type ViewPath = Spanned<ViewPath_>;
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum ViewPath_ {
/// `foo::bar::baz as quux`
/// Distinguishes between Attributes that decorate items and Attributes that
/// are contained as statements within items. These two cases need to be
/// distinguished for pretty-printing.
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum AttrStyle {
AttrOuter,
AttrInner,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub struct AttrId(pub usize);
/// Doc-comments are promoted to attributes that have is_sugared_doc = true
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Attribute_ {
pub id: AttrId,
pub style: AttrStyle,
/// that the ref_id is for. The impl_id maps to the "self type" of this impl.
/// If this impl is an ItemImpl, the impl_id is redundant (it could be the
/// same as the impl's node id).
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct TraitRef {
pub path: Path,
pub ref_id: NodeId,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct PolyTraitRef {
/// The `'a` in `<'a> Foo<&'a T>`
pub bound_lifetimes: Vec<LifetimeDef>,
pub trait_ref: TraitRef,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum Visibility {
Public,
Inherited,
}
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct StructField_ {
pub kind: StructFieldKind,
pub id: NodeId,
pub type StructField = Spanned<StructField_>;
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum StructFieldKind {
NamedField(Ident, Visibility),
/// Element of a tuple-like struct
}
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct StructDef {
/// Fields, not including ctor
pub fields: Vec<StructField>,
FIXME (#3300): Should allow items to be anonymous. Right now
we just use dummy names for anon items.
*/
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Item {
pub ident: Ident,
pub attrs: Vec<Attribute>,
pub span: Span,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum Item_ {
// Optional location (containing arbitrary characters) from which
// to fetch the crate sources.
}
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct ForeignItem {
pub ident: Ident,
pub attrs: Vec<Attribute>,
pub vis: Visibility,
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum ForeignItem_ {
ForeignItemFn(P<FnDecl>, Generics),
ForeignItemStatic(P<Ty>, /* is_mutbl */ bool),
}
}
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum ClosureKind {
FnClosureKind,
FnMutClosureKind,
/// The data we save and restore about an inlined item or method. This is not
/// part of the AST that we parse from a file, but it becomes part of the tree
/// that we trans.
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum InlinedItem {
IIItem(P<Item>),
IITraitItem(DefId /* impl id */, TraitItem),
/// A macro definition, in this crate or imported from another.
///
/// Not parsed directly, but created on macro import or `macro_rules!` expansion.
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct MacroDef {
pub ident: Ident,
pub attrs: Vec<Attribute>,
pub mod blocks;
-#[derive(Clone, Copy, PartialEq, Show)]
+#[derive(Clone, Copy, PartialEq, Debug)]
pub enum PathElem {
PathMod(Name),
PathName(Name)
}).to_string()
}
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
pub enum Node<'ast> {
NodeItem(&'ast Item),
NodeForeignItem(&'ast ForeignItem),
/// Represents an entry and its parent Node ID
/// The odd layout is to bring down the total size.
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
enum MapEntry<'ast> {
/// Placeholder for holes in the map.
NotPresent,
}
}
-#[derive(Show)]
+#[derive(Debug)]
struct InlinedParent {
path: Vec<PathElem>,
ii: InlinedItem
// ______________________________________________________________________
// Enumerating the IDs which appear in an AST
-#[derive(RustcEncodable, RustcDecodable, Show, Copy)]
+#[derive(RustcEncodable, RustcDecodable, Debug, Copy)]
pub struct IdRange {
pub min: NodeId,
pub max: NodeId,
}
/// Represents the #[deprecated] and friends attributes.
-#[derive(RustcEncodable,RustcDecodable,Clone,Show)]
+#[derive(RustcEncodable,RustcDecodable,Clone,Debug)]
pub struct Stability {
pub level: StabilityLevel,
pub feature: InternedString,
}
/// The available stability levels.
-#[derive(RustcEncodable,RustcDecodable,PartialEq,PartialOrd,Clone,Show,Copy)]
+#[derive(RustcEncodable,RustcDecodable,PartialEq,PartialOrd,Clone,Debug,Copy)]
pub enum StabilityLevel {
Unstable,
Stable,
}
}
-#[derive(PartialEq, Show, RustcEncodable, RustcDecodable, Copy)]
+#[derive(PartialEq, Debug, RustcEncodable, RustcDecodable, Copy)]
pub enum ReprAttr {
ReprAny,
ReprInt(Span, IntType),
}
}
-#[derive(Eq, Hash, PartialEq, Show, RustcEncodable, RustcDecodable, Copy)]
+#[derive(Eq, Hash, PartialEq, Debug, RustcEncodable, RustcDecodable, Copy)]
pub enum IntType {
SignedInt(ast::IntTy),
UnsignedInt(ast::UintTy)
/// A byte offset. Keep this small (currently 32-bits), as AST contains
/// a lot of them.
-#[derive(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Debug)]
pub struct BytePos(pub u32);
/// A character offset. Because of multibyte utf8 characters, a byte offset
/// is not equivalent to a character offset. The CodeMap will convert BytePos
/// values to CharPos values as necessary.
-#[derive(Copy, PartialEq, Hash, PartialOrd, Show)]
+#[derive(Copy, PartialEq, Hash, PartialOrd, Debug)]
pub struct CharPos(pub usize);
// FIXME: Lots of boilerplate in these impls, but so far my attempts to fix
/// are *absolute* positions from the beginning of the codemap, not positions
/// relative to FileMaps. Methods on the CodeMap can be used to relate spans back
/// to the original source.
-#[derive(Clone, Copy, Show, Hash)]
+#[derive(Clone, Copy, Debug, Hash)]
pub struct Span {
pub lo: BytePos,
pub hi: BytePos,
hi: BytePos(0),
expn_id: COMMAND_LINE_EXPN };
-#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub struct Spanned<T> {
pub node: T,
pub span: Span,
pub struct FileMapAndBytePos { pub fm: Rc<FileMap>, pub pos: BytePos }
/// The syntax with which a macro was invoked.
-#[derive(Clone, Copy, Hash, Show)]
+#[derive(Clone, Copy, Hash, Debug)]
pub enum MacroFormat {
/// e.g. #[derive(...)] <item>
MacroAttribute,
MacroBang
}
-#[derive(Clone, Hash, Show)]
+#[derive(Clone, Hash, Debug)]
pub struct NameAndSpan {
/// The name of the macro that was invoked to create the thing
/// with this Span.
}
/// Extra information for tracking macro expansion of spans
-#[derive(Hash, Show)]
+#[derive(Hash, Debug)]
pub struct ExpnInfo {
/// The location of the actual macro invocation, e.g. `let x =
/// foo!();`
pub callee: NameAndSpan
}
-#[derive(PartialEq, Eq, Clone, Show, Hash, RustcEncodable, RustcDecodable, Copy)]
+#[derive(PartialEq, Eq, Clone, Debug, Hash, RustcEncodable, RustcDecodable, Copy)]
pub struct ExpnId(u32);
pub const NO_EXPANSION: ExpnId = ExpnId(-1);
}
}
-#[derive(Copy, PartialEq, Clone, Show)]
+#[derive(Copy, PartialEq, Clone, Debug)]
pub enum Level {
Bug,
Fatal,
}
}
-#[derive(Show,Clone)]
+#[derive(Debug,Clone)]
pub enum Annotatable {
Item(P<ast::Item>),
TraitItem(ast::TraitItem),
// to an uninhabited type (e.g. a zero-variant enum or a
// type holding such an enum), but do not feature-gate
// zero-variant enums themselves, then attempting to
- // derive Show on such a type could here generate code
+ // derive Debug on such a type could here generate code
// that needs the feature gate enabled.)
return cx.expr_unreachable(sp);
rename_memo: RefCell<HashMap<(SyntaxContext,Ident,Name),SyntaxContext>>,
}
-#[derive(PartialEq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(PartialEq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum SyntaxContext_ {
EmptyCtxt,
Mark (Mrk,SyntaxContext),
// because of the SCTable, I now need a tidy way of
// creating syntax objects. Sigh.
- #[derive(Clone, PartialEq, Show)]
+ #[derive(Clone, PartialEq, Debug)]
enum TestSC {
M(Mrk),
R(Ident,Name)
}
}
-#[derive(Clone, PartialEq, Eq, Show)]
+#[derive(Clone, PartialEq, Eq, Debug)]
pub struct TokenAndSpan {
pub tok: token::Token,
pub sp: Span,
use std::rc::Rc;
#[allow(non_camel_case_types)]
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)]
pub enum BinOpToken {
Plus,
Minus,
}
/// A delimiter token
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)]
pub enum DelimToken {
/// A round parenthesis: `(` or `)`
Paren,
Brace,
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)]
pub enum IdentStyle {
/// `::` follows the identifier with no whitespace in-between.
ModName,
Plain,
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)]
pub enum SpecialMacroVar {
/// `$crate` will be filled in with the name of the crate a macro was
/// imported from, if any.
}
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)]
pub enum Lit {
Byte(ast::Name),
Char(ast::Name),
}
#[allow(non_camel_case_types)]
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug)]
pub enum Token {
/* Expression-operator symbols. */
Eq,
/// A parsed terminfo database entry.
-#[derive(Show)]
+#[derive(Debug)]
pub struct TermInfo {
/// Names for the terminal
pub names: Vec<String> ,
// colons. This way if some test runner wants to arrange the tests
// hierarchically it may.
-#[derive(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub enum TestName {
StaticTestName(&'static str),
DynTestName(String)
pub bytes: u64,
}
-#[derive(Copy, Clone, Show, PartialEq, Eq, Hash)]
+#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum ShouldFail {
No,
Yes(Option<&'static str>)
// The definition of a single test. A test runner will run a list of
// these.
-#[derive(Clone, Show, PartialEq, Eq, Hash)]
+#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct TestDesc {
pub name: TestName,
pub ignore: bool,
unsafe impl Send for TestDesc {}
-#[derive(Show)]
+#[derive(Debug)]
pub struct TestDescAndFn {
pub desc: TestDesc,
pub testfn: TestFn,
}
-#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show, Copy)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug, Copy)]
pub struct Metric {
value: f64,
noise: f64
iter: slice::Iter<'a, u16>
}
/// The possibilities for values decoded from a `u16` stream.
-#[derive(Copy, PartialEq, Eq, Clone, Show)]
+#[derive(Copy, PartialEq, Eq, Clone, Debug)]
pub enum Utf16Item {
/// A valid codepoint.
ScalarValue(char),
//! Error handling utilities. WIP.
use std::fmt;
-use std::fmt::{Show, Formatter};
+use std::fmt::{Debug, Formatter};
use std::old_io::IoError;
fn from_err(err: E) -> Self;
}
-impl Show for Box<Error + 'static> {
+impl Debug for Box<Error + 'static> {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
pub trait MyNum : Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + PartialEq + Clone {
}
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
pub struct MyInt {
pub val: int
}
Blue,
}
-impl fmt::Show for Color {
+impl fmt::Debug for Color {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let str = match *self {
Red => "red",
}
struct Number(uint);
-impl fmt::Show for Number {
+impl fmt::Debug for Number {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let mut out = vec![];
let Number(mut num) = *self;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(Show)] //~ERROR expected item after attributes
+#[derive(Debug)] //~ERROR expected item after attributes
// Test that we do not permit moves from &[] matched by a vec pattern.
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
struct Foo {
string: String
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(Show)]
+#[derive(Debug)]
struct foo {
i: isize,
}
struct Error;
-#[derive(Show)]
+#[derive(Debug)]
enum Enum {
A {
x: Error //~ ERROR
struct Error;
-#[derive(Show)]
+#[derive(Debug)]
enum Enum {
A(
Error //~ ERROR
struct Error;
-#[derive(Show)]
+#[derive(Debug)]
struct Struct {
x: Error //~ ERROR
}
struct Error;
-#[derive(Show)]
+#[derive(Debug)]
struct Struct(
Error //~ ERROR
);
// except according to those terms.
/// hi
-#[derive(Show)] //~ERROR expected item after attributes
+#[derive(Debug)] //~ERROR expected item after attributes
}
-#[derive(Show, Eq, PartialEq, Hash)]
+#[derive(Debug, Eq, PartialEq, Hash)]
enum RoomDirection {
West,
East,
impl TraversesWorld for Player {
}
-impl Show for Player {
+impl Debug for Player {
fn fmt(&self, formatter: &mut Formatter) -> Result<(), Error> {
formatter.write_str("Player{ name:");
formatter.write_str(self.name.as_slice());
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(Show)]
+#[derive(Debug)]
struct Pair<T, V> (T, V);
impl Pair<
fn main() {
let foo = 100;
- #[derive(Show)]
+ #[derive(Debug)]
enum Stuff {
Bar = foo //~ ERROR attempt to use a non-constant value in a constant
}
use std::thread::Thread;
use std::rc::Rc;
-#[derive(Show)]
+#[derive(Debug)]
struct Port<T>(Rc<T>);
fn main() {
- #[derive(Show)]
+ #[derive(Debug)]
struct foo {
_x: Port<()>,
}
// Test that a class with a non-copyable field can't be
// copied
-#[derive(Show)]
+#[derive(Debug)]
struct bar {
x: isize,
}
}
}
-#[derive(Show)]
+#[derive(Debug)]
struct foo {
i: isize,
j: bar,
// error-pattern:non-scalar cast
-#[derive(Show)]
+#[derive(Debug)]
struct foo {
x: isize
}
baz: usize
}
-#[derive(Show)]
+#[derive(Debug)]
struct Oof {
rab: u8,
zab: usize
#![feature(box_syntax)]
-#[derive(Show)]
+#[derive(Debug)]
struct r {
b: bool,
}
use std::cell::Cell;
-#[derive(Show)]
+#[derive(Debug)]
struct r<'a> {
i: &'a Cell<isize>,
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(Show)]
+#[derive(Debug)]
struct r {
i:isize
}
// except according to those terms.
#[repr(packed)]
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
struct Foo {
a: i8,
b: i16,
extern crate macro_crate_test;
#[into_foo]
-#[derive(PartialEq, Clone, Show)]
+#[derive(PartialEq, Clone, Debug)]
fn foo() -> AFakeTypeThatHadBetterGoAway {}
#[into_multi_foo]
-#[derive(PartialEq, Clone, Show)]
+#[derive(PartialEq, Clone, Debug)]
fn foo() -> AnotherFakeTypeThatHadBetterGoAway {}
trait Qux {
#![allow(unknown_features)]
#![feature(box_syntax)]
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
struct Point { x : int }
pub fn main() {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(Show)]
+#[derive(Debug)]
struct Pair<T, U> { a: T, b: U }
struct Triple { x: int, y: int, z: int }
}
}
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
struct p {
x: int,
y: int,
use std::mem::swap;
-#[derive(Show)]
+#[derive(Debug)]
struct Ints {sum: Box<int>, values: Vec<int> }
fn add_int(x: &mut Ints, v: int) {
use std::cmp;
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
enum cat_type { tuxedo, tabby, tortoiseshell }
impl cmp::PartialEq for cat_type {
use std::cmp;
-#[derive(Show)]
+#[derive(Debug)]
struct foo { a: int, b: int, c: int }
impl cmp::PartialEq for foo {
#[derive(PartialEq, PartialOrd, Eq, Ord,
Hash,
Clone,
- Show, Rand,
+ Debug, Rand,
Encodable, Decodable)]
enum A { A1(uint), A2(int) }
#[derive(PartialEq, PartialOrd, Eq, Ord,
Hash,
Clone,
- Show, Rand,
+ Debug, Rand,
Encodable, Decodable)]
struct B { x: uint, y: int }
#[derive(PartialEq, PartialOrd, Eq, Ord,
Hash,
Clone,
- Show, Rand,
+ Debug, Rand,
Encodable, Decodable)]
struct C(uint, int);
// except according to those terms.
pub fn main() {
- #[derive(Show)]
+ #[derive(Debug)]
struct Foo {
foo: int,
}
use std::num::FromPrimitive;
use std::int;
-#[derive(PartialEq, FromPrimitive, Show)]
+#[derive(PartialEq, FromPrimitive, Debug)]
enum A {
Foo = int::MAX,
Bar = 1,
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
enum Foo {
Bar,
Baz,
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
enum Foo {
Bar(int, int),
Baz(f64, f64)
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
struct Foo;
pub fn main() {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
enum S {
X { x: int, y: int },
Y
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
struct Foo(int, int, String);
pub fn main() {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
struct Foo {
x: int,
y: int,
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(PartialEq, Hash, Show)]
+#[derive(PartialEq, Hash, Debug)]
struct Foo<T> {
x: int,
y: T,
use std::thread::Thread;
use std::sync::mpsc::{channel, Sender};
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
enum Message {
Dropped,
DestructorRan
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
enum chan { chan_t, }
impl PartialEq for chan {
($m:ident, $t:ty, $v:expr) => {{
mod $m {
use std::mem::size_of;
- #[derive(Copy, Show)]
+ #[derive(Copy, Debug)]
enum E {
V = $v,
A = 0
assert_eq!(rs.i, 100);
}
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
enum mood { happy, sad, }
impl PartialEq for mood {
assert_eq!(rs.i, 100);
}
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
enum mood { happy, sad, }
impl PartialEq for mood {
// Test a foreign function that accepts and returns a struct
// by value.
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub struct TwoU16s {
one: u16, two: u16
}
// Test a foreign function that accepts and returns a struct
// by value.
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub struct TwoU32s {
one: u32, two: u32
}
// Test a foreign function that accepts and returns a struct
// by value.
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub struct TwoU64s {
one: u64, two: u64
}
// Test a foreign function that accepts and returns a struct
// by value.
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
pub struct TwoU8s {
one: u8, two: u8
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(Show)]
+#[derive(Debug)]
struct Foo {
x: int,
y: int
assert_eq!(x.baz(), (1, 'a'));
}
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
struct BazHelper<T>(T);
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
// Ensure that we can use previous type parameters in defaults.
struct Baz<T, U = BazHelper<T>, V = Option<U>>(T, U, V);
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(Show)]
+#[derive(Debug)]
enum Foo<'s> {
V(&'s str)
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(Show)]
+#[derive(Debug)]
struct MyStruct;
trait Repro {
use serialize::{Encodable, Decodable};
use serialize::json;
-#[derive(Encodable, Decodable, PartialEq, Show)]
+#[derive(Encodable, Decodable, PartialEq, Debug)]
struct UnitLikeStruct;
pub fn main() {
#![allow(unknown_features)]
#![feature(box_syntax)]
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
struct Bar {
x: int
}
}
}
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
struct Foo {
x: Bar,
a: int
#![feature(unboxed_closures)]
-#[derive(Show)]
+#[derive(Debug)]
struct LifetimeStruct<'a>;
fn main() {
trait Trait {}
-#[derive(Show)]
+#[derive(Debug)]
struct Foo<T: Trait> {
foo: T,
}
-#[derive(Show)]
+#[derive(Debug)]
struct Bar<T> where T: Trait {
bar: T,
}
payload: Option<T>
}
- #[derive(PartialEq, Show)]
+ #[derive(PartialEq, Debug)]
#[repr(int)]
pub enum state {
empty,
empty
}
-impl fmt::Show for square {
+impl fmt::Debug for square {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", match *self {
bot => { "R".to_string() }
// except according to those terms.
-#[derive(Show)]
+#[derive(Debug)]
enum Token {
Text(String),
ETag(Vec<String>, String),
fn print(&self);
}
-#[derive(Show)]
+#[derive(Debug)]
struct S {
s: int,
}
fn do_nothing(&self);
}
-#[derive(Show)]
+#[derive(Debug)]
struct A { a: int }
-#[derive(Show)]
+#[derive(Debug)]
struct B<'a> { b: int, pa: &'a A }
impl IDummy for A {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(Show)]
+#[derive(Debug)]
enum Numbers {
Three
}
struct Foo(Cell<int>);
-impl fmt::Show for Foo {
+impl fmt::Debug for Foo {
fn fmt(&self, _fmt: &mut fmt::Formatter) -> fmt::Result {
let Foo(ref f) = *self;
assert!(f.get() == 0);
}
}
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
struct A((u32, u32));
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
struct B(u64);
pub fn main() {
y: int
}
-impl fmt::Show for Thingy {
+impl fmt::Debug for Thingy {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{{ x: {:?}, y: {:?} }}", self.x, self.y)
}
x: T
}
-impl<T:fmt::Show> fmt::Show for PolymorphicThingy<T> {
+impl<T:fmt::Debug> fmt::Debug for PolymorphicThingy<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self.x)
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
struct Foo(uint);
fn foo() -> Foo {
use std::ops;
-#[derive(Show,PartialEq,Eq)]
+#[derive(Debug,PartialEq,Eq)]
struct Point {
x: int,
y: int
use std::cmp;
use std::ops;
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
struct Point {
x: int,
y: int
}
}
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
struct Point {
x: int,
y: int
use std::rc::Rc;
use std::num::ToPrimitive;
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
struct Point {
x: int,
y: int
use std::rc::Rc;
use std::string::String;
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
struct Point {
x: int,
y: int
use std::mem;
#[repr(packed)]
-#[derive(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Debug)]
struct Foo {
bar: u8,
baz: u64
type Type<'tcx> = &'tcx TypeStructure<'tcx>;
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
enum TypeStructure<'tcx> {
TypeInt,
TypeFunction(Type<'tcx>, Type<'tcx>),
use std::cell::Cell;
-#[derive(Show)]
+#[derive(Debug)]
struct r<'a> {
i: &'a Cell<int>,
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(Show,PartialEq,Clone)]
+#[derive(Debug,PartialEq,Clone)]
struct Foo<T> {
bar: T,
baz: T
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
pub struct Partial<T> { x: T, y: T }
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
struct S { val: int }
impl S { fn new(v: int) -> S { S { val: v } } }
impl Drop for S { fn drop(&mut self) { } }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
pub struct Partial<T> { x: T, y: T }
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
struct S { val: int }
impl S { fn new(v: int) -> S { S { val: v } } }
impl Drop for S { fn drop(&mut self) { } }
-#[derive(Copy, Show)]
+#[derive(Copy, Debug)]
enum foo { large, small, }
impl PartialEq for foo {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(Show)]
+#[derive(Debug)]
enum color {
red = 0xff0000,
green = 0x00ff00,
assert_eq!(s1.as_bytes()[3], 't' as u8);
}
-#[derive(Show)]
+#[derive(Debug)]
enum t {
tag1,
tag2(int),
trait MyNum : PartialEq { }
-#[derive(Show)]
+#[derive(Debug)]
struct MyInt { val: int }
impl PartialEq for MyInt {
trait MyNum : Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + PartialEq + Clone { }
-#[derive(Clone, Show)]
+#[derive(Clone, Debug)]
struct MyInt { val: int }
impl Add for MyInt {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(Show)]
+#[derive(Debug)]
struct Foo(int, int);
pub fn main() {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
struct Foo(int);
-#[derive(PartialEq, Show)]
+#[derive(PartialEq, Debug)]
struct Bar(int, int);
pub fn main() {
let mut f = bar(&x);
assert_eq!(f.call_mut(()), &x);
- #[derive(Clone, Copy, Show, PartialEq)]
+ #[derive(Clone, Copy, Debug, PartialEq)]
struct Foo(uint, &'static str);
let x = Foo(42, "forty-two");