about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-04-12 10:25:49 +0000
committerbors <bors@rust-lang.org>2022-04-12 10:25:49 +0000
commit2a83fbc42a9bb6bfdb8d3fb4ecce83fb410d7642 (patch)
treeadcd3859bc718dc7522e7ea8800ca338c43da86b /compiler/rustc_parse/src
parent4e1927db3c399fa34dc71992bd5dbec09f945c3d (diff)
parentc3d6082e9b53f9c43f46a72af1b957b0cc0b2bf7 (diff)
downloadrust-2a83fbc42a9bb6bfdb8d3fb4ecce83fb410d7642.tar.gz
rust-2a83fbc42a9bb6bfdb8d3fb4ecce83fb410d7642.zip
Auto merge of #95966 - matthiaskrgr:rollup-hhy4nod, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #95320 (Document the current MIR semantics that are clear from existing code)
 - #95722 (pre-push.sh: Use python3 if python is not found)
 - #95881 (Use `to_string` instead of `format!`)
 - #95909 (rustdoc: Reduce allocations in a `theme` function)
 - #95910 (Fix crate_type attribute to not warn on duplicates)
 - #95920 (use `Span::find_ancestor_inside` to get right span in CastCheck)
 - #95936 (Fix a bad error message for `relative paths are not supported in visibilities` error)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src')
-rw-r--r--compiler/rustc_parse/src/parser/item.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs
index 5bf6f22b5d0..ca81921faed 100644
--- a/compiler/rustc_parse/src/parser/item.rs
+++ b/compiler/rustc_parse/src/parser/item.rs
@@ -970,7 +970,7 @@ impl<'a> Parser<'a> {
         }
         if fixed_crate_name {
             let fixed_name_sp = ident.span.to(idents.last().unwrap().span);
-            let mut fixed_name = format!("{}", ident.name);
+            let mut fixed_name = ident.name.to_string();
             for part in idents {
                 fixed_name.push_str(&format!("_{}", part.name));
             }