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>:
1018
1018
p ! ( write( "{:?}" , char :: try_from( int) . unwrap( ) ) )
1019
1019
}
1020
1020
// Raw pointers
1021
- ( Scalar :: Int ( int) , ty:: RawPtr ( _) ) => {
1021
+ ( Scalar :: Int ( int) , ty:: RawPtr ( _) | ty :: FnPtr ( _ ) ) => {
1022
1022
let data = int. assert_bits ( self . tcx ( ) . data_layout . pointer_size ) ;
1023
1023
self = self . typed_value (
1024
1024
|mut this| {
@@ -1040,8 +1040,7 @@ pub trait PrettyPrinter<'tcx>:
1040
1040
" as " ,
1041
1041
) ?;
1042
1042
}
1043
- Some ( _) => p ! ( "<non-executable memory>" ) ,
1044
- None => p ! ( "<dangling pointer>" ) ,
1043
+ _ => self = self . pretty_print_const_pointer ( ptr, ty, print_ty) ?,
1045
1044
}
1046
1045
}
1047
1046
// For function type zsts just printing the path is enough
You can’t perform that action at this time.
0 commit comments