Remove unnecessary sigils around Symbol::as_str() calls.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user