diff options
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/attributes.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/attributes.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/attributes.rs b/compiler/rustc_codegen_llvm/src/attributes.rs index 8e6329a997f..f8ffcd94734 100644 --- a/compiler/rustc_codegen_llvm/src/attributes.rs +++ b/compiler/rustc_codegen_llvm/src/attributes.rs @@ -322,7 +322,7 @@ pub fn from_fn_attrs(cx: &CodegenCx<'ll, 'tcx>, llfn: &'ll Value, instance: ty:: .target_features .iter() .flat_map(|f| { - let feature = &f.as_str(); + let feature = f.as_str(); llvm_util::to_llvm_feature(cx.tcx.sess, feature) .into_iter() .map(|f| format!("+{}", f)) @@ -347,7 +347,7 @@ pub fn from_fn_attrs(cx: &CodegenCx<'ll, 'tcx>, llfn: &'ll Value, instance: ty:: let name = codegen_fn_attrs.link_name.unwrap_or_else(|| cx.tcx.item_name(instance.def_id())); - let name = CString::new(&name.as_str()[..]).unwrap(); + let name = CString::new(name.as_str()).unwrap(); llvm::AddFunctionAttrStringValue( llfn, llvm::AttributePlace::Function, |
