diff options
| author | Andrew Audibert <aaudibert10@gmail.com> | 2018-07-28 19:38:14 -0700 |
|---|---|---|
| committer | Andrew Audibert <andrew@alluxio.com> | 2018-07-28 19:40:52 -0700 |
| commit | f121b1a3a96d34909d148a31e7082c78da51111b (patch) | |
| tree | 22d063eb44951dc42f548eb8ee4130e5ea2d16fc /src/expr.rs | |
| parent | 69ad879d52606ac03440744efa5b4d8ca8cc7566 (diff) | |
Support raw identifiers in struct expressions
Diffstat (limited to 'src/expr.rs')
| -rw-r--r-- | src/expr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/expr.rs b/src/expr.rs index 6814b91e053..8118e3bccfd 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -1651,7 +1651,7 @@ pub fn rewrite_field( if !attrs_str.is_empty() { attrs_str.push_str(&shape.indent.to_string_with_newline(context.config)); }; - let name = &field.ident.name.to_string(); + let name = context.snippet(field.ident.span); if field.is_shorthand { Some(attrs_str + &name) } else { |
