diff options
| author | Nick Cameron <nrc@ncameron.org> | 2018-07-30 08:29:45 +1200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-30 08:29:45 +1200 |
| commit | dc209cc97fac89c5ab6fdd5214098b2799c4c661 (patch) | |
| tree | 6168a8330c935dc15e8d9ca2cabb1779454ebd7b /src/expr.rs | |
| parent | fad88596dd2fca432914640972baa6c65701a301 (diff) | |
| parent | f121b1a3a96d34909d148a31e7082c78da51111b (diff) | |
Merge pull request #2872 from aaudiber/raw-ident-struct-expr
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 { |
