diff options
| author | bors <bors@rust-lang.org> | 2016-02-11 12:52:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-02-11 12:52:42 +0000 |
| commit | 7732c0aa9ea12262cbe46fa77c2fa636e8aecf6a (patch) | |
| tree | 8d0364921d0d70e6fdc67176297a1f1ee3e5070e /src/libsyntax_ext/deriving/debug.rs | |
| parent | f5f8e0bfbeee2abc425f26a3ad36430f23010e69 (diff) | |
| parent | bafea3bf78e75c99958ef15fd3d06652cb63133c (diff) | |
| download | rust-7732c0aa9ea12262cbe46fa77c2fa636e8aecf6a.tar.gz rust-7732c0aa9ea12262cbe46fa77c2fa636e8aecf6a.zip | |
Auto merge of #31487 - oli-obk:breaking_batch/ast/unop, r=Manishearth
r? @Manishearth I just noticed they can't be rolled up (often modifying the same line(s) in imports). So once I reach the critical amount for them to be merged I'll create a PR that merges all of them.
Diffstat (limited to 'src/libsyntax_ext/deriving/debug.rs')
| -rw-r--r-- | src/libsyntax_ext/deriving/debug.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/libsyntax_ext/deriving/debug.rs b/src/libsyntax_ext/deriving/debug.rs index 008067f39a3..858066cb626 100644 --- a/src/libsyntax_ext/deriving/debug.rs +++ b/src/libsyntax_ext/deriving/debug.rs @@ -27,7 +27,7 @@ pub fn expand_deriving_debug(cx: &mut ExtCtxt, { // &mut ::std::fmt::Formatter let fmtr = Ptr(Box::new(Literal(path_std!(cx, core::fmt::Formatter))), - Borrowed(None, ast::MutMutable)); + Borrowed(None, ast::Mutability::Mutable)); let trait_def = TraitDef { span: span, @@ -71,8 +71,7 @@ fn show_substructure(cx: &mut ExtCtxt, span: Span, // 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 }; - let name = cx.expr_lit(span, ast::Lit_::LitStr(ident.name.as_str(), - ast::StrStyle::CookedStr)); + let name = cx.expr_lit(span, ast::LitKind::Str(ident.name.as_str(), ast::StrStyle::Cooked)); let builder = token::str_to_ident("builder"); let builder_expr = cx.expr_ident(span, builder.clone()); @@ -112,9 +111,9 @@ fn show_substructure(cx: &mut ExtCtxt, span: Span, stmts.push(cx.stmt_let(DUMMY_SP, true, builder, expr)); for field in fields { - let name = cx.expr_lit(field.span, ast::Lit_::LitStr( + let name = cx.expr_lit(field.span, ast::LitKind::Str( field.name.unwrap().name.as_str(), - ast::StrStyle::CookedStr)); + ast::StrStyle::Cooked)); // Use double indirection to make sure this works for unsized types let field = cx.expr_addr_of(field.span, field.self_.clone()); @@ -151,6 +150,6 @@ fn stmt_let_undescore(cx: &mut ExtCtxt, span: sp, attrs: None, }); - let decl = respan(sp, ast::DeclLocal(local)); - P(respan(sp, ast::StmtDecl(P(decl), ast::DUMMY_NODE_ID))) + let decl = respan(sp, ast::DeclKind::Local(local)); + P(respan(sp, ast::StmtKind::Decl(P(decl), ast::DUMMY_NODE_ID))) } |
