@@ -177,7 +177,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
177
177
178
178
check_call ( "invoke" , llfn, args) ;
179
179
180
- let bundle = bundle. as_ref ( ) . map ( |b| b. raw ( ) ) . unwrap_or ( 0 as * mut _ ) ;
180
+ let bundle = bundle. as_ref ( ) . map ( |b| b. raw ( ) ) . unwrap_or ( ptr :: null_mut ( ) ) ;
181
181
182
182
unsafe {
183
183
llvm:: LLVMRustBuildInvoke ( self . llbuilder ,
@@ -859,7 +859,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
859
859
860
860
check_call ( "call" , llfn, args) ;
861
861
862
- let bundle = bundle. as_ref ( ) . map ( |b| b. raw ( ) ) . unwrap_or ( 0 as * mut _ ) ;
862
+ let bundle = bundle. as_ref ( ) . map ( |b| b. raw ( ) ) . unwrap_or ( ptr :: null_mut ( ) ) ;
863
863
864
864
unsafe {
865
865
llvm:: LLVMRustBuildCall ( self . llbuilder , llfn, args. as_ptr ( ) ,
@@ -961,7 +961,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
961
961
self . count_insn ( "trap" ) ;
962
962
llvm:: LLVMRustBuildCall ( self . llbuilder , t,
963
963
args. as_ptr ( ) , args. len ( ) as c_uint ,
964
- 0 as * mut _ ,
964
+ ptr :: null_mut ( ) ,
965
965
noname ( ) ) ;
966
966
}
967
967
}
@@ -1000,7 +1000,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
1000
1000
parent : Option < ValueRef > ,
1001
1001
args : & [ ValueRef ] ) -> ValueRef {
1002
1002
self . count_insn ( "cleanuppad" ) ;
1003
- let parent = parent. unwrap_or ( 0 as * mut _ ) ;
1003
+ let parent = parent. unwrap_or ( ptr :: null_mut ( ) ) ;
1004
1004
let name = CString :: new ( "cleanuppad" ) . unwrap ( ) ;
1005
1005
let ret = unsafe {
1006
1006
llvm:: LLVMRustBuildCleanupPad ( self . llbuilder ,
@@ -1016,7 +1016,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
1016
1016
pub fn cleanup_ret ( & self , cleanup : ValueRef ,
1017
1017
unwind : Option < BasicBlockRef > ) -> ValueRef {
1018
1018
self . count_insn ( "cleanupret" ) ;
1019
- let unwind = unwind. unwrap_or ( 0 as * mut _ ) ;
1019
+ let unwind = unwind. unwrap_or ( ptr :: null_mut ( ) ) ;
1020
1020
let ret = unsafe {
1021
1021
llvm:: LLVMRustBuildCleanupRet ( self . llbuilder , cleanup, unwind)
1022
1022
} ;
@@ -1052,8 +1052,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
1052
1052
unwind : Option < BasicBlockRef > ,
1053
1053
num_handlers : usize ) -> ValueRef {
1054
1054
self . count_insn ( "catchswitch" ) ;
1055
- let parent = parent. unwrap_or ( 0 as * mut _ ) ;
1056
- let unwind = unwind. unwrap_or ( 0 as * mut _ ) ;
1055
+ let parent = parent. unwrap_or ( ptr :: null_mut ( ) ) ;
1056
+ let unwind = unwind. unwrap_or ( ptr :: null_mut ( ) ) ;
1057
1057
let name = CString :: new ( "catchswitch" ) . unwrap ( ) ;
1058
1058
let ret = unsafe {
1059
1059
llvm:: LLVMRustBuildCatchSwitch ( self . llbuilder , parent, unwind,
0 commit comments