File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ use llvm;
1414use rustc:: session:: Session ;
1515use rustc:: session:: config:: PrintRequest ;
1616use libc:: c_int;
17- use std:: ffi:: { CStr , CString } ;
17+ use std:: ffi:: CString ;
1818
1919use std:: sync:: atomic:: { AtomicBool , Ordering } ;
2020use std:: sync:: Once ;
@@ -118,14 +118,14 @@ pub fn target_features(sess: &Session) -> Vec<Symbol> {
118118 . iter ( )
119119 . filter ( |feature| {
120120 let llvm_feature = to_llvm_feature ( feature) ;
121- let ptr = CString :: new ( llvm_feature) . as_ptr ( ) ;
121+ let ptr = CString :: new ( llvm_feature) . unwrap ( ) . as_ptr ( ) ;
122122 unsafe { llvm:: LLVMRustHasFeature ( target_machine, ptr) }
123123 } )
124- . map ( Symbol :: intern) . collect ( )
124+ . map ( |feature| Symbol :: intern ( feature ) ) . collect ( )
125125}
126126
127127pub fn target_feature_whitelist ( sess : & Session ) -> & ' static [ & ' static str ] {
128- let whitelist = match & * sess. target . target . arch {
128+ match & * sess. target . target . arch {
129129 "arm" => ARM_WHITELIST ,
130130 "aarch64" => AARCH64_WHITELIST ,
131131 "x86" | "x86_64" => X86_WHITELIST ,
You can’t perform that action at this time.
0 commit comments