File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
compiler/rustc_middle/src/ty/print Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -1018,7 +1018,7 @@ pub trait PrettyPrinter<'tcx>:
10181018 p ! ( write( "{:?}" , char :: try_from( int) . unwrap( ) ) )
10191019 }
10201020 // Raw pointers
1021- ( Scalar :: Int ( int) , ty:: RawPtr ( _) ) => {
1021+ ( Scalar :: Int ( int) , ty:: RawPtr ( _) | ty :: FnPtr ( _ ) ) => {
10221022 let data = int. assert_bits ( self . tcx ( ) . data_layout . pointer_size ) ;
10231023 self = self . typed_value (
10241024 |mut this| {
@@ -1040,8 +1040,7 @@ pub trait PrettyPrinter<'tcx>:
10401040 " as " ,
10411041 ) ?;
10421042 }
1043- Some ( _) => p ! ( "<non-executable memory>" ) ,
1044- None => p ! ( "<dangling pointer>" ) ,
1043+ _ => self = self . pretty_print_const_pointer ( ptr, ty, print_ty) ?,
10451044 }
10461045 }
10471046 // For function type zsts just printing the path is enough
You can’t perform that action at this time.
0 commit comments