@@ -60,7 +60,7 @@ impl<'tcx> HasLocalDecls<'tcx> for LocalDecls<'tcx> {
6060 }
6161}
6262
63- impl < ' tcx > HasLocalDecls < ' tcx > for Mir < ' tcx > {
63+ impl < ' tcx > HasLocalDecls < ' tcx > for Body < ' tcx > {
6464 fn local_decls ( & self ) -> & LocalDecls < ' tcx > {
6565 & self . local_decls
6666 }
@@ -86,7 +86,7 @@ impl MirPhase {
8686
8787/// Lowered representation of a single function.
8888#[ derive( Clone , RustcEncodable , RustcDecodable , Debug ) ]
89- pub struct Mir < ' tcx > {
89+ pub struct Body < ' tcx > {
9090 /// List of basic blocks. References to basic block use a newtyped index type `BasicBlock`
9191 /// that indexes into this vector.
9292 basic_blocks : IndexVec < BasicBlock , BasicBlockData < ' tcx > > ,
@@ -107,15 +107,15 @@ pub struct Mir<'tcx> {
107107 pub source_scope_local_data : ClearCrossCrate < IndexVec < SourceScope , SourceScopeLocalData > > ,
108108
109109 /// Rvalues promoted from this function, such as borrows of constants.
110- /// Each of them is the Mir of a constant with the fn's type parameters
110+ /// Each of them is the Body of a constant with the fn's type parameters
111111 /// in scope, but a separate set of locals.
112- pub promoted : IndexVec < Promoted , Mir < ' tcx > > ,
112+ pub promoted : IndexVec < Promoted , Body < ' tcx > > ,
113113
114114 /// Yields type of the function, if it is a generator.
115115 pub yield_ty : Option < Ty < ' tcx > > ,
116116
117117 /// Generator drop glue
118- pub generator_drop : Option < Box < Mir < ' tcx > > > ,
118+ pub generator_drop : Option < Box < Body < ' tcx > > > ,
119119
120120 /// The layout of a generator. Produced by the state transformation.
121121 pub generator_layout : Option < GeneratorLayout < ' tcx > > ,
@@ -167,12 +167,12 @@ pub struct Mir<'tcx> {
167167 cache : cache:: Cache ,
168168}
169169
170- impl < ' tcx > Mir < ' tcx > {
170+ impl < ' tcx > Body < ' tcx > {
171171 pub fn new (
172172 basic_blocks : IndexVec < BasicBlock , BasicBlockData < ' tcx > > ,
173173 source_scopes : IndexVec < SourceScope , SourceScopeData > ,
174174 source_scope_local_data : ClearCrossCrate < IndexVec < SourceScope , SourceScopeLocalData > > ,
175- promoted : IndexVec < Promoted , Mir < ' tcx > > ,
175+ promoted : IndexVec < Promoted , Body < ' tcx > > ,
176176 yield_ty : Option < Ty < ' tcx > > ,
177177 local_decls : LocalDecls < ' tcx > ,
178178 user_type_annotations : CanonicalUserTypeAnnotations < ' tcx > ,
@@ -189,7 +189,7 @@ impl<'tcx> Mir<'tcx> {
189189 local_decls. len( )
190190 ) ;
191191
192- Mir {
192+ Body {
193193 phase : MirPhase :: Build ,
194194 basic_blocks,
195195 source_scopes,
@@ -423,7 +423,7 @@ pub enum Safety {
423423 ExplicitUnsafe ( hir:: HirId ) ,
424424}
425425
426- impl_stable_hash_for ! ( struct Mir <' tcx> {
426+ impl_stable_hash_for ! ( struct Body <' tcx> {
427427 phase,
428428 basic_blocks,
429429 source_scopes,
@@ -442,7 +442,7 @@ impl_stable_hash_for!(struct Mir<'tcx> {
442442 cache
443443} ) ;
444444
445- impl < ' tcx > Index < BasicBlock > for Mir < ' tcx > {
445+ impl < ' tcx > Index < BasicBlock > for Body < ' tcx > {
446446 type Output = BasicBlockData < ' tcx > ;
447447
448448 #[ inline]
@@ -451,7 +451,7 @@ impl<'tcx> Index<BasicBlock> for Mir<'tcx> {
451451 }
452452}
453453
454- impl < ' tcx > IndexMut < BasicBlock > for Mir < ' tcx > {
454+ impl < ' tcx > IndexMut < BasicBlock > for Body < ' tcx > {
455455 #[ inline]
456456 fn index_mut ( & mut self , index : BasicBlock ) -> & mut BasicBlockData < ' tcx > {
457457 & mut self . basic_blocks_mut ( ) [ index]
@@ -599,7 +599,7 @@ newtype_index! {
599599 }
600600}
601601
602- /// Classifies locals into categories. See `Mir ::local_kind`.
602+ /// Classifies locals into categories. See `Body ::local_kind`.
603603#[ derive( PartialEq , Eq , Debug , HashStable ) ]
604604pub enum LocalKind {
605605 /// User-declared variable binding
@@ -2831,23 +2831,23 @@ impl<'tcx> Display for Constant<'tcx> {
28312831 }
28322832}
28332833
2834- impl < ' tcx > graph:: DirectedGraph for Mir < ' tcx > {
2834+ impl < ' tcx > graph:: DirectedGraph for Body < ' tcx > {
28352835 type Node = BasicBlock ;
28362836}
28372837
2838- impl < ' tcx > graph:: WithNumNodes for Mir < ' tcx > {
2838+ impl < ' tcx > graph:: WithNumNodes for Body < ' tcx > {
28392839 fn num_nodes ( & self ) -> usize {
28402840 self . basic_blocks . len ( )
28412841 }
28422842}
28432843
2844- impl < ' tcx > graph:: WithStartNode for Mir < ' tcx > {
2844+ impl < ' tcx > graph:: WithStartNode for Body < ' tcx > {
28452845 fn start_node ( & self ) -> Self :: Node {
28462846 START_BLOCK
28472847 }
28482848}
28492849
2850- impl < ' tcx > graph:: WithPredecessors for Mir < ' tcx > {
2850+ impl < ' tcx > graph:: WithPredecessors for Body < ' tcx > {
28512851 fn predecessors < ' graph > (
28522852 & ' graph self ,
28532853 node : Self :: Node ,
@@ -2856,7 +2856,7 @@ impl<'tcx> graph::WithPredecessors for Mir<'tcx> {
28562856 }
28572857}
28582858
2859- impl < ' tcx > graph:: WithSuccessors for Mir < ' tcx > {
2859+ impl < ' tcx > graph:: WithSuccessors for Body < ' tcx > {
28602860 fn successors < ' graph > (
28612861 & ' graph self ,
28622862 node : Self :: Node ,
@@ -2865,12 +2865,12 @@ impl<'tcx> graph::WithSuccessors for Mir<'tcx> {
28652865 }
28662866}
28672867
2868- impl < ' a , ' b > graph:: GraphPredecessors < ' b > for Mir < ' a > {
2868+ impl < ' a , ' b > graph:: GraphPredecessors < ' b > for Body < ' a > {
28692869 type Item = BasicBlock ;
28702870 type Iter = IntoIter < BasicBlock > ;
28712871}
28722872
2873- impl < ' a , ' b > graph:: GraphSuccessors < ' b > for Mir < ' a > {
2873+ impl < ' a , ' b > graph:: GraphSuccessors < ' b > for Body < ' a > {
28742874 type Item = BasicBlock ;
28752875 type Iter = iter:: Cloned < Successors < ' b > > ;
28762876}
@@ -2909,7 +2909,7 @@ impl Location {
29092909 }
29102910
29112911 /// Returns `true` if `other` is earlier in the control flow graph than `self`.
2912- pub fn is_predecessor_of < ' tcx > ( & self , other : Location , mir : & Mir < ' tcx > ) -> bool {
2912+ pub fn is_predecessor_of < ' tcx > ( & self , other : Location , mir : & Body < ' tcx > ) -> bool {
29132913 // If we are in the same block as the other location and are an earlier statement
29142914 // then we are a predecessor of `other`.
29152915 if self . block == other. block && self . statement_index < other. statement_index {
@@ -3162,7 +3162,7 @@ CloneTypeFoldableAndLiftImpls! {
31623162}
31633163
31643164BraceStructTypeFoldableImpl ! {
3165- impl <' tcx> TypeFoldable <' tcx> for Mir <' tcx> {
3165+ impl <' tcx> TypeFoldable <' tcx> for Body <' tcx> {
31663166 phase,
31673167 basic_blocks,
31683168 source_scopes,
0 commit comments