Skip to content

Commit 7098d75

Browse files
committed
use syn::Index::from for tuples
The existing behavior only worked because of rust-lang/rust#60210.
1 parent 53e803b commit 7098d75

File tree

1 file changed

+1
-1
lines changed
  • components/lark-debug-derive/src

1 file changed

+1
-1
lines changed

components/lark-debug-derive/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ fn debug_with_struct(type_name: &syn::Ident, data: &syn::DataStruct) -> TokenStr
141141
// Expands to an expression like
142142
//
143143
// fmt.debug_tuple("foo").field(self.0.debug_with(cx)).finish()
144-
let indices = 0..fields.unnamed.len();
144+
let indices = (0..fields.unnamed.len()).map(|i| syn::Index::from(i));
145145
quote! {
146146
fmt.debug_tuple(stringify!(#type_name))
147147
#(

0 commit comments

Comments
 (0)