about summary refs log tree commit diff
path: root/src/libsyntax_expand
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-10-22 08:31:37 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2019-11-02 09:01:00 +1100
commit5bc7084f7e1be9da93bb014e05f19a80ff6fa188 (patch)
tree791694964a4af2e1c0f109fb2c423f2e6f9893c5 /src/libsyntax_expand
parent9cf59b517867562ebf7413ca2cda762c6b7d6fc0 (diff)
downloadrust-5bc7084f7e1be9da93bb014e05f19a80ff6fa188.tar.gz
rust-5bc7084f7e1be9da93bb014e05f19a80ff6fa188.zip
Convert `x.as_str().to_string()` to `x.to_string()` where possible.
Diffstat (limited to 'src/libsyntax_expand')
-rw-r--r--src/libsyntax_expand/mbe/macro_rules.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax_expand/mbe/macro_rules.rs b/src/libsyntax_expand/mbe/macro_rules.rs
index 9a4130b2d8d..2a8c455d7f0 100644
--- a/src/libsyntax_expand/mbe/macro_rules.rs
+++ b/src/libsyntax_expand/mbe/macro_rules.rs
@@ -225,7 +225,7 @@ fn generic_extension<'cx>(
                 };
                 let mut p = Parser::new(cx.parse_sess(), tts, Some(directory), true, false, None);
                 p.root_module_name =
-                    cx.current_expansion.module.mod_path.last().map(|id| id.as_str().to_string());
+                    cx.current_expansion.module.mod_path.last().map(|id| id.to_string());
                 p.last_type_ascription = cx.current_expansion.prior_type_ascription;
 
                 p.process_potential_macro_variable();