// table and a SyntaxContext to track renaming and
// macro expansion per Flatt et al., "Macros
// That Work Together"
-#[deriving_eq]
+#[deriving(Eq)]
pub struct ident { repr: Name }
// a SyntaxContext represents a chain of macro-expandings
// and renamings. Each macro expansion corresponds to
// a fresh uint
-#[deriving_eq]
+#[deriving(Eq)]
pub enum SyntaxContext {
MT,
Mark (Mrk,~SyntaxContext),
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct Lifetime {
id: node_id,
span: span,
// of supporting information.
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct path {
span: span,
global: bool,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct def_id {
crate: crate_num,
node: node_id,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
// The AST represents all type param bounds as types.
// typeck::collect::compute_bounds matches these against
// the "special" built-in traits (see middle::lang_items) and
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct TyParam {
ident: ident,
id: node_id,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct Generics {
lifetimes: OptVec<Lifetime>,
ty_params: OptVec<TyParam>
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum def {
def_fn(def_id, purity),
def_static_method(/* method */ def_id,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct crate_ {
module: _mod,
attrs: ~[attribute],
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum meta_item_ {
meta_word(@~str),
meta_list(@~str, ~[@meta_item]),
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct blk_ {
view_items: ~[@view_item],
stmts: ~[@stmt],
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct pat {
id: node_id,
node: pat_,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct field_pat {
ident: ident,
pat: @pat,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum binding_mode {
bind_by_copy,
bind_by_ref(mutability),
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum pat_ {
pat_wild,
// A pat_ident may either be a new bound variable,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum mutability { m_mutbl, m_imm, m_const, }
impl to_bytes::IterBytes for mutability {
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum Abi {
RustAbi
}
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum Sigil {
BorrowedSigil,
OwnedSigil,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum vstore {
// FIXME (#3469): Change uint to @expr (actually only constant exprs)
vstore_fixed(Option<uint>), // [1,2,3,4]
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum expr_vstore {
expr_vstore_fixed(Option<uint>), // [1,2,3,4]
expr_vstore_uniq, // ~[1,2,3,4]
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum binop {
add,
subtract,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum unop {
box(mutability),
uniq(mutability),
// using ty::resolved_T(...).
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum inferable<T> {
expl(T),
infer(node_id)
// "resolved" mode: the real modes.
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum rmode { by_ref, by_copy }
impl to_bytes::IterBytes for rmode {
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum stmt_ {
stmt_decl(@decl, node_id),
// a refinement on pat.
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct local_ {
is_mutbl: bool,
ty: @Ty,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum decl_ { decl_local(~[@local]), decl_item(@item), }
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct arm {
pats: ~[@pat],
guard: Option<@expr>,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct field_ {
mutbl: mutability,
ident: ident,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum blk_check_mode { default_blk, unsafe_blk, }
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct expr {
id: node_id,
// Extra node ID is only used for index, assign_op, unary, binary, method
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum log_level { error, debug, log_other }
// 0 = error, 1 = debug, 2 = log_other
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum CallSugar {
NoSugar,
DoSugar,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum expr_ {
expr_vstore(@expr, expr_vstore),
expr_vec(~[@expr], mutability),
//
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
#[doc="For macro invocations; parsing is delegated to the macro"]
pub enum token_tree {
// a single token
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum matcher_ {
// match one token
match_tok(::parse::token::Token),
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum mac_ {
mac_invoc_tt(@path,~[token_tree]), // new macro-invocation
}
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum lit_ {
lit_str(@~str),
lit_int(i64, int_ty),
// type structure in middle/ty.rs as well.
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct mt {
ty: @Ty,
mutbl: mutability,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct ty_field_ {
ident: ident,
mt: mt,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct ty_method {
ident: ident,
attrs: ~[attribute],
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
// A trait method is either required (meaning it doesn't have an
// implementation, just a signature) or provided (meaning it has a default
// implementation).
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum int_ty { ty_i, ty_char, ty_i8, ty_i16, ty_i32, ty_i64, }
impl ToStr for int_ty {
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum uint_ty { ty_u, ty_u8, ty_u16, ty_u32, ty_u64, }
impl ToStr for uint_ty {
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum float_ty { ty_f, ty_f32, ty_f64, }
impl ToStr for float_ty {
// NB Eq method appears below.
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct Ty {
id: node_id,
node: ty_,
// Not represented directly in the AST, referred to by name through a ty_path.
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum prim_ty {
ty_int(int_ty),
ty_uint(uint_ty),
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum Onceness {
Once,
Many
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct TyClosure {
sigil: Sigil,
region: Option<@Lifetime>,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct TyBareFn {
purity: purity,
abi: Abi,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum ty_ {
ty_nil,
ty_bot, /* bottom type */
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct arg {
mode: mode,
is_mutbl: bool,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct fn_decl {
inputs: ~[arg],
output: @Ty,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum purity {
pure_fn, // declared with "pure fn"
unsafe_fn, // declared with "unsafe fn"
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum ret_style {
noreturn, // functions with return type _|_ that always
// raise an error or exit (i.e. never return to the caller)
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum self_ty_ {
sty_static, // no self
sty_by_ref, // ``
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct method {
ident: ident,
attrs: ~[attribute],
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct _mod {
view_items: ~[@view_item],
items: ~[@item],
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum foreign_abi {
foreign_abi_rust_intrinsic,
foreign_abi_cdecl,
// Foreign mods can be named or anonymous
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum foreign_mod_sort { named, anonymous }
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct foreign_mod {
sort: foreign_mod_sort,
abi: ident,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct variant_arg {
ty: @Ty,
id: node_id,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum variant_kind {
tuple_variant_kind(~[variant_arg]),
struct_variant_kind(@struct_def),
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct enum_def {
variants: ~[variant],
common: Option<@struct_def>,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct variant_ {
name: ident,
attrs: ~[attribute],
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct path_list_ident_ {
name: ident,
id: node_id,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum namespace { module_ns, type_value_ns }
pub type view_path = spanned<view_path_>;
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum view_path_ {
// quux = foo::bar::baz
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct view_item {
node: view_item_,
attrs: ~[attribute],
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum view_item_ {
view_item_extern_mod(ident, ~[@meta_item], node_id),
view_item_use(~[@view_path]),
// distinguished for pretty-printing.
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum attr_style { attr_outer, attr_inner, }
// doc-comments are promoted to attributes that have is_sugared_doc = true
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct attribute_ {
style: attr_style,
value: @meta_item,
*/
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct trait_ref {
path: @path,
ref_id: node_id,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum visibility { public, private, inherited }
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct struct_field_ {
kind: struct_field_kind,
id: node_id,
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum struct_field_kind {
named_field(ident, struct_mutability, visibility),
unnamed_field // element of a tuple-like struct
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct struct_def {
fields: ~[@struct_field], /* fields */
/* (not including ctor or dtor) */
*/
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct item {
ident: ident,
attrs: ~[attribute],
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum item_ {
item_const(@Ty, @expr),
item_fn(fn_decl, purity, Generics, blk),
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum struct_mutability { struct_mutable, struct_immutable }
impl to_bytes::IterBytes for struct_mutability {
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct struct_dtor_ {
id: node_id,
attrs: ~[attribute],
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub struct foreign_item {
ident: ident,
attrs: ~[attribute],
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum foreign_item_ {
foreign_item_fn(fn_decl, purity, Generics),
foreign_item_const(@Ty)
// that we trans.
#[auto_encode]
#[auto_decode]
-#[deriving_eq]
+#[deriving(Eq)]
pub enum inlined_item {
ii_item(@item),
ii_method(def_id /* impl id */, @method),