From 5bc7084f7e1be9da93bb014e05f19a80ff6fa188 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 22 Oct 2019 08:31:37 +1100 Subject: Convert `x.as_str().to_string()` to `x.to_string()` where possible. --- src/libsyntax_expand/mbe/macro_rules.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax_expand') 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(); -- cgit 1.4.1-3-g733a5