@@ -61,10 +61,10 @@ pub struct Frame<'tcx, Prov: Provenance = CtfeProvenance, Extra = ()> {
6161 // Function and callsite information
6262 ////////////////////////////////////////////////////////////////////////////////
6363 /// The MIR for the function called on this frame.
64- pub body : & ' tcx mir:: Body < ' tcx > ,
64+ pub ( super ) body : & ' tcx mir:: Body < ' tcx > ,
6565
6666 /// The def_id and args of the current function.
67- pub instance : ty:: Instance < ' tcx > ,
67+ pub ( super ) instance : ty:: Instance < ' tcx > ,
6868
6969 /// Extra data for the machine.
7070 pub extra : Extra ,
@@ -73,7 +73,7 @@ pub struct Frame<'tcx, Prov: Provenance = CtfeProvenance, Extra = ()> {
7373 // Return place and locals
7474 ////////////////////////////////////////////////////////////////////////////////
7575 /// Work to perform when returning from this function.
76- pub return_to_block : StackPopCleanup ,
76+ return_to_block : StackPopCleanup ,
7777
7878 /// The location where the result of the current stack frame should be written to,
7979 /// and its layout in the caller.
@@ -101,7 +101,7 @@ pub struct Frame<'tcx, Prov: Provenance = CtfeProvenance, Extra = ()> {
101101 /// frames without cleanup code).
102102 ///
103103 /// 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 > ,
105105}
106106
107107#[ derive( Clone , Copy , Eq , PartialEq , Debug ) ] // Miri debug-prints these
@@ -269,6 +269,14 @@ impl<'tcx, Prov: Provenance, Extra> Frame<'tcx, Prov, Extra> {
269269 self . loc
270270 }
271271
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+
272280 /// Return the `SourceInfo` of the current instruction.
273281 pub fn current_source_info ( & self ) -> Option < & mir:: SourceInfo > {
274282 self . loc . left ( ) . map ( |loc| self . body . source_info ( loc) )
0 commit comments