about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/base.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2021-12-15 14:39:23 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2021-12-15 17:32:14 +1100
commit056d48a2c97860b2cce936f310331e606076fa01 (patch)
treec456e6021abf01fe5350f022926a9974795c071f /compiler/rustc_codegen_llvm/src/base.rs
parent8cddcd39ba2189da859a5164804556190906ee2a (diff)
downloadrust-056d48a2c97860b2cce936f310331e606076fa01.tar.gz
rust-056d48a2c97860b2cce936f310331e606076fa01.zip
Remove unnecessary sigils around `Symbol::as_str()` calls.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/base.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/base.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/base.rs b/compiler/rustc_codegen_llvm/src/base.rs
index 7a3e11e32bc..a539b0e3f16 100644
--- a/compiler/rustc_codegen_llvm/src/base.rs
+++ b/compiler/rustc_codegen_llvm/src/base.rs
@@ -82,7 +82,7 @@ pub fn compile_codegen_unit(
             &[cgu_name.to_string(), cgu.size_estimate().to_string()],
         );
         // Instantiate monomorphizations without filling out definitions yet...
-        let llvm_module = ModuleLlvm::new(tcx, &cgu_name.as_str());
+        let llvm_module = ModuleLlvm::new(tcx, cgu_name.as_str());
         {
             let cx = CodegenCx::new(tcx, cgu, &llvm_module);
             let mono_items = cx.codegen_unit.items_in_deterministic_order(cx.tcx);
@@ -146,7 +146,7 @@ pub fn set_link_section(llval: &Value, attrs: &CodegenFnAttrs) {
         None => return,
     };
     unsafe {
-        let buf = SmallCStr::new(&sect.as_str());
+        let buf = SmallCStr::new(sect.as_str());
         llvm::LLVMSetSection(llval, buf.as_ptr());
     }
 }