@@ -61,10 +61,10 @@ pub struct Frame<'tcx, Prov: Provenance = CtfeProvenance, Extra = ()> {
61
61
// Function and callsite information
62
62
////////////////////////////////////////////////////////////////////////////////
63
63
/// The MIR for the function called on this frame.
64
- pub body : & ' tcx mir:: Body < ' tcx > ,
64
+ pub ( super ) body : & ' tcx mir:: Body < ' tcx > ,
65
65
66
66
/// The def_id and args of the current function.
67
- pub instance : ty:: Instance < ' tcx > ,
67
+ pub ( super ) instance : ty:: Instance < ' tcx > ,
68
68
69
69
/// Extra data for the machine.
70
70
pub extra : Extra ,
@@ -73,7 +73,7 @@ pub struct Frame<'tcx, Prov: Provenance = CtfeProvenance, Extra = ()> {
73
73
// Return place and locals
74
74
////////////////////////////////////////////////////////////////////////////////
75
75
/// Work to perform when returning from this function.
76
- pub return_to_block : StackPopCleanup ,
76
+ return_to_block : StackPopCleanup ,
77
77
78
78
/// The location where the result of the current stack frame should be written to,
79
79
/// and its layout in the caller.
@@ -101,7 +101,7 @@ pub struct Frame<'tcx, Prov: Provenance = CtfeProvenance, Extra = ()> {
101
101
/// frames without cleanup code).
102
102
///
103
103
/// Needs to be public because ConstProp does unspeakable things to it.
104
- pub loc : Either < mir:: Location , Span > ,
104
+ pub ( super ) loc : Either < mir:: Location , Span > ,
105
105
}
106
106
107
107
#[ derive( Clone , Copy , Eq , PartialEq , Debug ) ] // Miri debug-prints these
@@ -269,6 +269,14 @@ impl<'tcx, Prov: Provenance, Extra> Frame<'tcx, Prov, Extra> {
269
269
self . loc
270
270
}
271
271
272
+ pub fn body ( & self ) -> & ' tcx mir:: Body < ' tcx > {
273
+ self . body
274
+ }
275
+
276
+ pub fn instance ( & self ) -> ty:: Instance < ' tcx > {
277
+ self . instance
278
+ }
279
+
272
280
/// Return the `SourceInfo` of the current instruction.
273
281
pub fn current_source_info ( & self ) -> Option < & mir:: SourceInfo > {
274
282
self . loc . left ( ) . map ( |loc| self . body . source_info ( loc) )
0 commit comments