@@ -190,7 +190,7 @@ fn encodable_substructure(cx: &mut ExtCtxt,
190190 Struct ( _, ref fields) => {
191191 let emit_struct_field = cx. ident_of ( "emit_struct_field" ) ;
192192 let mut stmts = Vec :: new ( ) ;
193- for ( i, & FieldInfo { name, ref self_, span, attrs , .. } ) in fields. iter ( ) . enumerate ( ) {
193+ for ( i, & FieldInfo { name, ref self_, span, .. } ) in fields. iter ( ) . enumerate ( ) {
194194 let name = match name {
195195 Some ( id) => id. name ,
196196 None => Symbol :: intern ( & format ! ( "_field{}" , i) ) ,
@@ -213,17 +213,7 @@ fn encodable_substructure(cx: &mut ExtCtxt,
213213 cx. expr ( span, ExprKind :: Ret ( Some ( call) ) )
214214 } ;
215215
216- // This exists for https://github.com/rust-lang/rust/pull/47540
217- //
218- // If we decide to stabilize that flag this can be removed
219- let expr = if attrs. iter ( ) . any ( |a| a. check_name ( "rustc_serialize_exclude_null" ) ) {
220- let is_some = cx. ident_of ( "is_some" ) ;
221- let condition = cx. expr_method_call ( span, self_. clone ( ) , is_some, vec ! [ ] ) ;
222- cx. expr_if ( span, condition, call, None )
223- } else {
224- call
225- } ;
226- let stmt = cx. stmt_expr ( expr) ;
216+ let stmt = cx. stmt_expr ( call) ;
227217 stmts. push ( stmt) ;
228218 }
229219
0 commit comments