We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c6adb4 commit c2a31deCopy full SHA for c2a31de
src/librustc_trans/llvm_util.rs
@@ -118,8 +118,8 @@ pub fn target_features(sess: &Session) -> Vec<Symbol> {
118
.iter()
119
.filter(|feature| {
120
let llvm_feature = to_llvm_feature(feature);
121
- let ptr = CString::new(llvm_feature).unwrap().as_ptr();
122
- unsafe { llvm::LLVMRustHasFeature(target_machine, ptr) }
+ let cstr = CString::new(llvm_feature).unwrap();
+ unsafe { llvm::LLVMRustHasFeature(target_machine, cstr.as_ptr()) }
123
})
124
.map(|feature| Symbol::intern(feature)).collect()
125
}
0 commit comments