diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-07-19 13:30:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-19 13:30:46 +0200 |
| commit | 4815f94c51d9c4a9c43fcc77da0c788056f9cf9e (patch) | |
| tree | aa27e40035aa34bb4384b85a0debf8e2bbee1520 /compiler/rustc_codegen_llvm/src | |
| parent | 31473928e993517f4e1909478c573628d8119cdc (diff) | |
| parent | a22934bea1d02870cda58eb6297ff9332fcc2104 (diff) | |
| download | rust-4815f94c51d9c4a9c43fcc77da0c788056f9cf9e.tar.gz rust-4815f94c51d9c4a9c43fcc77da0c788056f9cf9e.zip | |
Rollup merge of #99401 - TaKO8Ki:avoid-symbol-to-&str-conversions, r=nnethercote
Avoid `Symbol` to `&str` conversions `Symbol::as_str` is a slowish operation, so this patch removes some usages of it.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs b/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs index 5186aee57fb..80fd9726fc7 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs @@ -55,7 +55,7 @@ pub fn get_or_insert_gdb_debug_scripts_section_global<'ll>(cx: &CodegenCx<'ll, ' // The initial byte `4` instructs GDB that the following pretty printer // is defined inline as opposed to in a standalone file. section_contents.extend_from_slice(b"\x04"); - let vis_name = format!("pretty-printer-{}-{}\n", crate_name.as_str(), index); + let vis_name = format!("pretty-printer-{}-{}\n", crate_name, index); section_contents.extend_from_slice(vis_name.as_bytes()); section_contents.extend_from_slice(&visualizer.src); |
