diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2021-12-15 14:39:23 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2021-12-15 17:32:14 +1100 |
| commit | 056d48a2c97860b2cce936f310331e606076fa01 (patch) | |
| tree | c456e6021abf01fe5350f022926a9974795c071f /compiler/rustc_codegen_gcc | |
| parent | 8cddcd39ba2189da859a5164804556190906ee2a (diff) | |
| download | rust-056d48a2c97860b2cce936f310331e606076fa01.tar.gz rust-056d48a2c97860b2cce936f310331e606076fa01.zip | |
Remove unnecessary sigils around `Symbol::as_str()` calls.
Diffstat (limited to 'compiler/rustc_codegen_gcc')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/common.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/declare.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/intrinsic/mod.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/intrinsic/simd.rs | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_gcc/src/common.rs b/compiler/rustc_codegen_gcc/src/common.rs index bda08b653f0..ec542e55681 100644 --- a/compiler/rustc_codegen_gcc/src/common.rs +++ b/compiler/rustc_codegen_gcc/src/common.rs @@ -33,7 +33,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { return value; } - let global = self.global_string(&*symbol.as_str()); + let global = self.global_string(symbol.as_str()); self.const_cstr_cache.borrow_mut().insert(symbol, global); global diff --git a/compiler/rustc_codegen_gcc/src/declare.rs b/compiler/rustc_codegen_gcc/src/declare.rs index b79a50d1eee..dbee505a497 100644 --- a/compiler/rustc_codegen_gcc/src/declare.rs +++ b/compiler/rustc_codegen_gcc/src/declare.rs @@ -17,7 +17,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { global.set_tls_model(self.tls_model); } if let Some(link_section) = link_section { - global.set_link_section(&link_section.as_str()); + global.set_link_section(link_section.as_str()); } global } @@ -53,7 +53,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { global.set_tls_model(self.tls_model); } if let Some(link_section) = link_section { - global.set_link_section(&link_section.as_str()); + global.set_link_section(link_section.as_str()); } let global_address = global.get_address(None); self.globals.borrow_mut().insert(name.to_string(), global_address); diff --git a/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs b/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs index f3a2382ef32..0782adeb6a1 100644 --- a/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs +++ b/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs @@ -88,7 +88,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { let arg_tys = sig.inputs(); let ret_ty = sig.output(); let name = tcx.item_name(def_id); - let name_str = &*name.as_str(); + let name_str = name.as_str(); let llret_ty = self.layout_of(ret_ty).gcc_type(self, true); let result = PlaceRef::new_sized(llresult, fn_abi.ret.layout); diff --git a/compiler/rustc_codegen_gcc/src/intrinsic/simd.rs b/compiler/rustc_codegen_gcc/src/intrinsic/simd.rs index 26a42217e4c..aff27f71d91 100644 --- a/compiler/rustc_codegen_gcc/src/intrinsic/simd.rs +++ b/compiler/rustc_codegen_gcc/src/intrinsic/simd.rs @@ -52,7 +52,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(bx: &mut Builder<'a, 'gcc, 'tcx>, let sig = tcx.normalize_erasing_late_bound_regions(ty::ParamEnv::reveal_all(), callee_ty.fn_sig(tcx)); let arg_tys = sig.inputs(); - let name_str = &*name.as_str(); + let name_str = name.as_str(); // every intrinsic below takes a SIMD vector as its first argument require_simd!(arg_tys[0], "input"); |
