@@ -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
@@ -2853,23 +2853,23 @@ fn def_path_str(def_id: DefId) -> String {
28532853 ty:: tls:: with ( |tcx| tcx. def_path_str ( def_id) )
28542854}
28552855
2856- impl < ' tcx > graph:: DirectedGraph for Mir < ' tcx > {
2856+ impl < ' tcx > graph:: DirectedGraph for Body < ' tcx > {
28572857 type Node = BasicBlock ;
28582858}
28592859
2860- impl < ' tcx > graph:: WithNumNodes for Mir < ' tcx > {
2860+ impl < ' tcx > graph:: WithNumNodes for Body < ' tcx > {
28612861 fn num_nodes ( & self ) -> usize {
28622862 self . basic_blocks . len ( )
28632863 }
28642864}
28652865
2866- impl < ' tcx > graph:: WithStartNode for Mir < ' tcx > {
2866+ impl < ' tcx > graph:: WithStartNode for Body < ' tcx > {
28672867 fn start_node ( & self ) -> Self :: Node {
28682868 START_BLOCK
28692869 }
28702870}
28712871
2872- impl < ' tcx > graph:: WithPredecessors for Mir < ' tcx > {
2872+ impl < ' tcx > graph:: WithPredecessors for Body < ' tcx > {
28732873 fn predecessors < ' graph > (
28742874 & ' graph self ,
28752875 node : Self :: Node ,
@@ -2878,7 +2878,7 @@ impl<'tcx> graph::WithPredecessors for Mir<'tcx> {
28782878 }
28792879}
28802880
2881- impl < ' tcx > graph:: WithSuccessors for Mir < ' tcx > {
2881+ impl < ' tcx > graph:: WithSuccessors for Body < ' tcx > {
28822882 fn successors < ' graph > (
28832883 & ' graph self ,
28842884 node : Self :: Node ,
@@ -2887,12 +2887,12 @@ impl<'tcx> graph::WithSuccessors for Mir<'tcx> {
28872887 }
28882888}
28892889
2890- impl < ' a , ' b > graph:: GraphPredecessors < ' b > for Mir < ' a > {
2890+ impl < ' a , ' b > graph:: GraphPredecessors < ' b > for Body < ' a > {
28912891 type Item = BasicBlock ;
28922892 type Iter = IntoIter < BasicBlock > ;
28932893}
28942894
2895- impl < ' a , ' b > graph:: GraphSuccessors < ' b > for Mir < ' a > {
2895+ impl < ' a , ' b > graph:: GraphSuccessors < ' b > for Body < ' a > {
28962896 type Item = BasicBlock ;
28972897 type Iter = iter:: Cloned < Successors < ' b > > ;
28982898}
@@ -2931,7 +2931,7 @@ impl Location {
29312931 }
29322932
29332933 /// Returns `true` if `other` is earlier in the control flow graph than `self`.
2934- pub fn is_predecessor_of < ' tcx > ( & self , other : Location , mir : & Mir < ' tcx > ) -> bool {
2934+ pub fn is_predecessor_of < ' tcx > ( & self , other : Location , mir : & Body < ' tcx > ) -> bool {
29352935 // If we are in the same block as the other location and are an earlier statement
29362936 // then we are a predecessor of `other`.
29372937 if self . block == other. block && self . statement_index < other. statement_index {
@@ -3165,7 +3165,7 @@ CloneTypeFoldableAndLiftImpls! {
31653165}
31663166
31673167BraceStructTypeFoldableImpl ! {
3168- impl <' tcx> TypeFoldable <' tcx> for Mir <' tcx> {
3168+ impl <' tcx> TypeFoldable <' tcx> for Body <' tcx> {
31693169 phase,
31703170 basic_blocks,
31713171 source_scopes,
0 commit comments