mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.
This commit is contained in:
parent
7b87085c18
commit
ef8edd4e87
168 changed files with 2247 additions and 2408 deletions
|
@ -47,15 +47,16 @@ pub fn expand_jstraceable(cx: &mut ExtCtxt, span: Span, mitem: &MetaItem, item:
|
|||
],
|
||||
associated_types: vec![],
|
||||
};
|
||||
trait_def.expand(cx, mitem, item, |a| push(a))
|
||||
trait_def.expand(cx, mitem, item, push)
|
||||
}
|
||||
|
||||
// Mostly copied from syntax::ext::deriving::hash
|
||||
/// Defines how the implementation for `trace()` is to be generated
|
||||
fn jstraceable_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructure) -> P<Expr> {
|
||||
let state_expr = match substr.nonself_args {
|
||||
[ref state_expr] => state_expr,
|
||||
_ => cx.span_bug(trait_span, "incorrect number of arguments in `jstraceable`")
|
||||
let state_expr = if substr.nonself_args.len() == 1 {
|
||||
&substr.nonself_args[0]
|
||||
} else {
|
||||
cx.span_bug(trait_span, "incorrect number of arguments in `jstraceable`")
|
||||
};
|
||||
let trace_ident = substr.method_ident;
|
||||
let call_trace = |span, thing_expr| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue