@@ -177,7 +177,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
177177
178178 check_call ( "invoke" , llfn, args) ;
179179
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 ( ) ) ;
181181
182182 unsafe {
183183 llvm:: LLVMRustBuildInvoke ( self . llbuilder ,
@@ -859,7 +859,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
859859
860860 check_call ( "call" , llfn, args) ;
861861
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 ( ) ) ;
863863
864864 unsafe {
865865 llvm:: LLVMRustBuildCall ( self . llbuilder , llfn, args. as_ptr ( ) ,
@@ -961,7 +961,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
961961 self . count_insn ( "trap" ) ;
962962 llvm:: LLVMRustBuildCall ( self . llbuilder , t,
963963 args. as_ptr ( ) , args. len ( ) as c_uint ,
964- 0 as * mut _ ,
964+ ptr :: null_mut ( ) ,
965965 noname ( ) ) ;
966966 }
967967 }
@@ -1000,7 +1000,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
10001000 parent : Option < ValueRef > ,
10011001 args : & [ ValueRef ] ) -> ValueRef {
10021002 self . count_insn ( "cleanuppad" ) ;
1003- let parent = parent. unwrap_or ( 0 as * mut _ ) ;
1003+ let parent = parent. unwrap_or ( ptr :: null_mut ( ) ) ;
10041004 let name = CString :: new ( "cleanuppad" ) . unwrap ( ) ;
10051005 let ret = unsafe {
10061006 llvm:: LLVMRustBuildCleanupPad ( self . llbuilder ,
@@ -1016,7 +1016,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
10161016 pub fn cleanup_ret ( & self , cleanup : ValueRef ,
10171017 unwind : Option < BasicBlockRef > ) -> ValueRef {
10181018 self . count_insn ( "cleanupret" ) ;
1019- let unwind = unwind. unwrap_or ( 0 as * mut _ ) ;
1019+ let unwind = unwind. unwrap_or ( ptr :: null_mut ( ) ) ;
10201020 let ret = unsafe {
10211021 llvm:: LLVMRustBuildCleanupRet ( self . llbuilder , cleanup, unwind)
10221022 } ;
@@ -1052,8 +1052,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
10521052 unwind : Option < BasicBlockRef > ,
10531053 num_handlers : usize ) -> ValueRef {
10541054 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 ( ) ) ;
10571057 let name = CString :: new ( "catchswitch" ) . unwrap ( ) ;
10581058 let ret = unsafe {
10591059 llvm:: LLVMRustBuildCatchSwitch ( self . llbuilder , parent, unwind,
0 commit comments