File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ use llvm;
14
14
use rustc:: session:: Session ;
15
15
use rustc:: session:: config:: PrintRequest ;
16
16
use libc:: c_int;
17
- use std:: ffi:: { CStr , CString } ;
17
+ use std:: ffi:: CString ;
18
18
19
19
use std:: sync:: atomic:: { AtomicBool , Ordering } ;
20
20
use std:: sync:: Once ;
@@ -118,14 +118,14 @@ pub fn target_features(sess: &Session) -> Vec<Symbol> {
118
118
. iter ( )
119
119
. filter ( |feature| {
120
120
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 ( ) ;
122
122
unsafe { llvm:: LLVMRustHasFeature ( target_machine, ptr) }
123
123
} )
124
- . map ( Symbol :: intern) . collect ( )
124
+ . map ( |feature| Symbol :: intern ( feature ) ) . collect ( )
125
125
}
126
126
127
127
pub fn target_feature_whitelist ( sess : & Session ) -> & ' static [ & ' static str ] {
128
- let whitelist = match & * sess. target . target . arch {
128
+ match & * sess. target . target . arch {
129
129
"arm" => ARM_WHITELIST ,
130
130
"aarch64" => AARCH64_WHITELIST ,
131
131
"x86" | "x86_64" => X86_WHITELIST ,
You can’t perform that action at this time.
0 commit comments