commit | 18837696e5faf3e843ea6a3213a9485185df87d3 | [log] [tgz] |
---|---|---|
author | David Tolnay <dtolnay@gmail.com> | Sun May 20 20:17:20 2018 -0700 |
committer | David Tolnay <dtolnay@gmail.com> | Sun May 20 20:18:28 2018 -0700 |
tree | d2a84f071b16b3fd6be72b1fb85ed46285d33fe3 | |
parent | 94dea10aa589b80ae61d64f426c5473e4a0e8941 [diff] [blame] |
Fold span inside of Ident
diff --git a/codegen/src/main.rs b/codegen/src/main.rs index a344585..f155fbf 100644 --- a/codegen/src/main.rs +++ b/codegen/src/main.rs
@@ -892,7 +892,11 @@ .collect() } Fields::Unit => { - state.fold_impl.push_str(" _i\n"); + if s.ast.ident == "Ident" { + state.fold_impl.push_str(" Ident::new(&_i.to_string(), _visitor.fold_span(_i.span()))\n"); + } else { + state.fold_impl.push_str(" _i\n"); + } vec![] } };