We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b08bc78 commit e906745Copy full SHA for e906745
compiler/rustc_middle/src/ty/print/pretty.rs
@@ -1018,7 +1018,7 @@ pub trait PrettyPrinter<'tcx>:
1018
p!(write("{:?}", char::try_from(int).unwrap()))
1019
}
1020
// Raw pointers
1021
- (Scalar::Int(int), ty::RawPtr(_)) => {
+ (Scalar::Int(int), ty::RawPtr(_) | ty::FnPtr(_)) => {
1022
let data = int.assert_bits(self.tcx().data_layout.pointer_size);
1023
self = self.typed_value(
1024
|mut this| {
@@ -1040,8 +1040,7 @@ pub trait PrettyPrinter<'tcx>:
1040
" as ",
1041
)?;
1042
1043
- Some(_) => p!("<non-executable memory>"),
1044
- None => p!("<dangling pointer>"),
+ _ => self = self.pretty_print_const_pointer(ptr, ty, print_ty)?,
1045
1046
1047
// For function type zsts just printing the path is enough
0 commit comments