explicit_self: borrowed_explicit_self(),
args: Vec::new(),
ret_ty: Self,
- inline: true,
+ attributes: attrs,
const_nonmatching: false,
- combine_substructure: |c, s, sub| cs_clone("Clone", c, s, sub)
+ combine_substructure: combine_substructure(|c, s, sub| {
+ cs_clone("Clone", c, s, sub)
+ }),
}
)
};
explicit_self: borrowed_explicit_self(),
args: vec!(borrowed_self()),
ret_ty: Literal(Path::new(vec!("bool"))),
- inline: true,
+ attributes: attrs,
const_nonmatching: true,
- combine_substructure: $f
+ combine_substructure: combine_substructure(|a, b, c| {
+ $f(a, b, c)
+ })
}
- }
+ } }
);
let trait_def = TraitDef {
explicit_self: borrowed_explicit_self(),
args: vec!(borrowed_self()),
ret_ty: Literal(Path::new(vec!("bool"))),
- inline: true,
+ attributes: attrs,
const_nonmatching: false,
- combine_substructure: |cx, span, substr| cs_op($op, $equal, cx, span, substr)
+ combine_substructure: combine_substructure(|cx, span, substr| {
+ cs_op($op, $equal, cx, span, substr)
+ })
}
- }
+ } }
);
let trait_def = TraitDef {
explicit_self: borrowed_explicit_self(),
args: vec!(),
ret_ty: nil_ty(),
- inline: true,
+ attributes: attrs,
const_nonmatching: true,
- combine_substructure: cs_total_eq_assert
+ combine_substructure: combine_substructure(|a, b, c| {
+ cs_total_eq_assert(a, b, c)
+ })
}
)
};
explicit_self: borrowed_explicit_self(),
args: vec!(borrowed_self()),
ret_ty: Literal(Path::new(vec!("std", "cmp", "Ordering"))),
- inline: true,
+ attributes: attrs,
const_nonmatching: false,
- combine_substructure: cs_cmp
+ combine_substructure: combine_substructure(|a, b, c| {
+ cs_cmp(a, b, c)
+ }),
}
)
};
Borrowed(None, MutMutable))),
ret_ty: Literal(Path::new_(vec!("std", "result", "Result"), None,
vec!(~Self, ~Literal(Path::new_local("__E"))), true)),
- inline: false,
+ attributes: Vec::new(),
const_nonmatching: true,
- combine_substructure: decodable_substructure,
+ combine_substructure: combine_substructure(|a, b, c| {
+ decodable_substructure(a, b, c)
+ }),
})
};
explicit_self: None,
args: Vec::new(),
ret_ty: Self,
- inline: true,
+ attributes: attrs,
const_nonmatching: false,
- combine_substructure: default_substructure
+ combine_substructure: combine_substructure(|a, b, c| {
+ default_substructure(a, b, c)
+ })
})
};
trait_def.expand(cx, mitem, item, push)
vec!(~Tuple(Vec::new()),
~Literal(Path::new_local("__E"))),
true)),
- inline: false,
+ attributes: Vec::new(),
const_nonmatching: true,
- combine_substructure: encodable_substructure,
+ combine_substructure: combine_substructure(|a, b, c| {
+ encodable_substructure(a, b, c)
+ }),
})
};
explicit_self: borrowed_explicit_self(),
args: vec!(Ptr(~Literal(args), Borrowed(None, MutMutable))),
ret_ty: nil_ty(),
- inline: true,
+ attributes: attrs,
const_nonmatching: false,
- combine_substructure: hash_substructure
+ combine_substructure: combine_substructure(|a, b, c| {
+ hash_substructure(a, b, c)
+ })
}
)
};
None,
vec!(~Self),
true)),
- // liable to cause code-bloat
- inline: true,
+ // #[inline] liable to cause code-bloat
+ attributes: attrs.clone(),
const_nonmatching: false,
- combine_substructure: |c, s, sub| cs_from("i64", c, s, sub),
+ combine_substructure: combine_substructure(|c, s, sub| {
+ cs_from("i64", c, s, sub)
+ }),
},
MethodDef {
name: "from_u64",
None,
vec!(~Self),
true)),
- // liable to cause code-bloat
- inline: true,
+ // #[inline] liable to cause code-bloat
+ attributes: attrs,
const_nonmatching: false,
- combine_substructure: |c, s, sub| cs_from("u64", c, s, sub),
+ combine_substructure: combine_substructure(|c, s, sub| {
+ cs_from("u64", c, s, sub)
+ }),
})
};
Borrowed(None, ast::MutMutable))
),
ret_ty: Self,
- inline: false,
+ attributes: Vec::new(),
const_nonmatching: false,
- combine_substructure: rand_substructure
+ combine_substructure: combine_substructure(|a, b, c| {
+ rand_substructure(a, b, c)
+ })
}
)
};
explicit_self: borrowed_explicit_self(),
args: vec!(fmtr),
ret_ty: Literal(Path::new(vec!("std", "fmt", "Result"))),
- inline: false,
+ attributes: Vec::new(),
const_nonmatching: false,
- combine_substructure: show_substructure
+ combine_substructure: combine_substructure(|a, b, c| {
+ show_substructure(a, b, c)
+ })
}
)
};
explicit_self: None,
args: Vec::new(),
ret_ty: Self,
- inline: true,
+ attributes: attrs.clone(),
const_nonmatching: false,
- combine_substructure: zero_substructure
+ combine_substructure: combine_substructure(|a, b, c| {
+ zero_substructure(a, b, c)
+ })
},
MethodDef {
name: "is_zero",
explicit_self: borrowed_explicit_self(),
args: Vec::new(),
ret_ty: Literal(Path::new(vec!("bool"))),
- inline: true,
+ attributes: attrs,
const_nonmatching: false,
- combine_substructure: |cx, span, substr| {
+ combine_substructure: combine_substructure(|cx, span, substr| {
cs_and(|cx, span, _, _| cx.span_bug(span,
"Non-matching enum \
variant in \