@@ -894,17 +894,6 @@ macro_rules! _init_and_read_tlv_stream {
894894	} 
895895} 
896896
897- /// Dummy macro that drops the second argument (which is used by 
898- /// [`lightning_macros::drop_legacy_field_definition`] to match for legacy fields but isn't needed 
899- /// in the final code we want to generate). 
900- #[ doc( hidden) ]  
901- #[ macro_export]  
902- macro_rules!  _ignore_arg { 
903- 	( $field:  ident,  $fieldty:  tt)  => { 
904- 		$field
905- 	} ; 
906- } 
907- 
908897/// Reads a TLV stream with the given fields to build a struct/enum variant of type `$thing` 
909898#[ doc( hidden) ]  
910899#[ macro_export]  
@@ -913,18 +902,8 @@ macro_rules! _decode_and_build {
913902		$crate:: _init_and_read_len_prefixed_tlv_fields!( $stream,  { 
914903			$( ( $type,  $field,  $fieldty) ) ,* 
915904		} ) ; 
916- 		// rustc is kinda dumb about unused variable warnings when we declare a variable via an 
917- 		// ident in a macro and then use it in an expr also defined in the same macro call. Thus, 
918- 		// it may generate unused variable warnings for variables that are, in fact, very much 
919- 		// used. Instead, we just blanket ignore unused variables here as it may be useful to write 
920- 		// field names without a _ prefix for legacy fields even if we don't care about the read 
921- 		// value. 
922- 		$( 
923- 			#[ allow( unused_variables) ] 
924- 			let  $field = $crate:: _init_tlv_based_struct_field!( $field,  $fieldty) ; 
925- 		) * 
926905		:: lightning_macros:: drop_legacy_field_definition!( $thing { 
927- 			$( $field:  $crate:: _ignore_arg !( $field,  $fieldty) ) ,* 
906+ 			$( $field:  $crate:: _init_tlv_based_struct_field !( $field,  $fieldty) ) ,* 
928907		} ) 
929908	}  } 
930909} 
0 commit comments