Skip to content

Commit

Permalink
use syn::Index::from for tuples
Browse files Browse the repository at this point in the history
The existing behavior only worked because of rust-lang/rust#60210.
  • Loading branch information
nikomatsakis committed May 4, 2019
1 parent 53e803b commit 7098d75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lark-debug-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ fn debug_with_struct(type_name: &syn::Ident, data: &syn::DataStruct) -> TokenStr
// Expands to an expression like
//
// fmt.debug_tuple("foo").field(self.0.debug_with(cx)).finish()
let indices = 0..fields.unnamed.len();
let indices = (0..fields.unnamed.len()).map(|i| syn::Index::from(i));
quote! {
fmt.debug_tuple(stringify!(#type_name))
#(
Expand Down

0 comments on commit 7098d75

Please sign in to comment.