diff options
| author | bors <bors@rust-lang.org> | 2018-05-22 01:53:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-22 01:53:55 +0000 |
| commit | 38fd7ea50adf894ae6235abba883ea9981996af9 (patch) | |
| tree | 0289ad820cc693331f3f6dd4904b94928a97f3b5 /src/libsyntax_ext | |
| parent | 65a16c000720f286c91747b91e6d9caa7b1bb63c (diff) | |
| parent | b0e66386f761ef7dff9edba1f81a693c94e1adfa (diff) | |
| download | rust-38fd7ea50adf894ae6235abba883ea9981996af9.tar.gz rust-38fd7ea50adf894ae6235abba883ea9981996af9.zip | |
Auto merge of #50486 - Manishearth:approx-stab, r=nrc
Stabilize suggestion applicability field in json output cc @killercup r? @nrc
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/deriving/encodable.rs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/libsyntax_ext/deriving/encodable.rs b/src/libsyntax_ext/deriving/encodable.rs index 2c6c18cc51c..8b409df1f09 100644 --- a/src/libsyntax_ext/deriving/encodable.rs +++ b/src/libsyntax_ext/deriving/encodable.rs @@ -190,7 +190,7 @@ fn encodable_substructure(cx: &mut ExtCtxt, Struct(_, ref fields) => { let emit_struct_field = cx.ident_of("emit_struct_field"); let mut stmts = Vec::new(); - for (i, &FieldInfo { name, ref self_, span, attrs, .. }) in fields.iter().enumerate() { + for (i, &FieldInfo { name, ref self_, span, .. }) in fields.iter().enumerate() { let name = match name { Some(id) => id.name, None => Symbol::intern(&format!("_field{}", i)), @@ -213,17 +213,7 @@ fn encodable_substructure(cx: &mut ExtCtxt, cx.expr(span, ExprKind::Ret(Some(call))) }; - // This exists for https://github.com/rust-lang/rust/pull/47540 - // - // If we decide to stabilize that flag this can be removed - let expr = if attrs.iter().any(|a| a.check_name("rustc_serialize_exclude_null")) { - let is_some = cx.ident_of("is_some"); - let condition = cx.expr_method_call(span, self_.clone(), is_some, vec![]); - cx.expr_if(span, condition, call, None) - } else { - call - }; - let stmt = cx.stmt_expr(expr); + let stmt = cx.stmt_expr(call); stmts.push(stmt); } |
