Merge ExpnId and SyntaxContext.

This commit is contained in:
Jeffrey Seyfried
2017-03-17 04:04:41 +00:00
parent 496996c2af
commit ec7c0aece1
46 changed files with 456 additions and 702 deletions

View File

@@ -66,8 +66,8 @@ fn show_substructure(cx: &mut ExtCtxt, span: Span, substr: &Substructure) -> P<E
StaticEnum(..) => cx.span_bug(span, "nonsensical .fields in `#[derive(Debug)]`"),
};
// We want to make sure we have the expn_id set so that we can use unstable methods
let span = Span { expn_id: cx.backtrace(), ..span };
// We want to make sure we have the ctxt set so that we can use unstable methods
let span = Span { ctxt: cx.backtrace(), ..span };
let name = cx.expr_lit(span, ast::LitKind::Str(ident.name, ast::StrStyle::Cooked));
let builder = Ident::from_str("builder");
let builder_expr = cx.expr_ident(span, builder.clone());