about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/coverageinfo
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-21 22:34:19 +0000
committerbors <bors@rust-lang.org>2023-11-21 22:34:19 +0000
commitfec80b4475c871ad3e4d70d29d1781ee771fe631 (patch)
tree9397b939e5b564fab21d6f252d3f737625e40df8 /compiler/rustc_codegen_llvm/src/coverageinfo
parent2f8d81f9dbac6b8df982199f69da04a4c8357227 (diff)
parent21a870515b18e5b2b90435d0f1a6d3089b5217ae (diff)
downloadrust-fec80b4475c871ad3e4d70d29d1781ee771fe631.tar.gz
rust-fec80b4475c871ad3e4d70d29d1781ee771fe631.zip
Auto merge of #118143 - Nilstrieb:only-borrow-what-you-need, r=compiler-errors
Fix `clippy::needless_borrow` in the compiler

`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`.

Then I had to remove a few unnecessary parens and muts that were exposed now.

r? `@compiler-errors` you told me you want to review this

I will do a self review first (which, for this, is easiest on GitHub once the PR is open) - did it
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/coverageinfo')
-rw-r--r--compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs b/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs
index 274e0aeaaba..4f540de7ae0 100644
--- a/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs
+++ b/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs
@@ -176,7 +176,7 @@ impl GlobalFileTable {
         // compilation directory can be combined with the relative paths
         // to get absolute paths, if needed.
         use rustc_session::RemapFileNameExt;
-        let working_dir: &str = &tcx.sess.opts.working_dir.for_codegen(&tcx.sess).to_string_lossy();
+        let working_dir: &str = &tcx.sess.opts.working_dir.for_codegen(tcx.sess).to_string_lossy();
 
         llvm::build_byte_buffer(|buffer| {
             coverageinfo::write_filenames_section_to_buffer(