about summary refs log tree commit diff
path: root/src/expr.rs
diff options
context:
space:
mode:
authorNick Cameron <nrc@ncameron.org>2018-07-30 08:29:45 +1200
committerGitHub <noreply@github.com>2018-07-30 08:29:45 +1200
commitdc209cc97fac89c5ab6fdd5214098b2799c4c661 (patch)
tree6168a8330c935dc15e8d9ca2cabb1779454ebd7b /src/expr.rs
parentfad88596dd2fca432914640972baa6c65701a301 (diff)
parentf121b1a3a96d34909d148a31e7082c78da51111b (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.rs2
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 {