@@ -1034,10 +1034,10 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
10341034 }
10351035
10361036 hir:: ExprAssign ( ref l, ref r) => {
1037- // see comment on lvalues in
1038- // propagate_through_lvalue_components ()
1039- let succ = self . write_lvalue ( & l, succ, ACC_WRITE ) ;
1040- let succ = self . propagate_through_lvalue_components ( & l, succ) ;
1037+ // see comment on places in
1038+ // propagate_through_place_components ()
1039+ let succ = self . write_place ( & l, succ, ACC_WRITE ) ;
1040+ let succ = self . propagate_through_place_components ( & l, succ) ;
10411041 self . propagate_through_expr ( & r, succ)
10421042 }
10431043
@@ -1047,11 +1047,11 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
10471047 let succ = self . propagate_through_expr ( & l, succ) ;
10481048 self . propagate_through_expr ( & r, succ)
10491049 } else {
1050- // see comment on lvalues in
1051- // propagate_through_lvalue_components ()
1052- let succ = self . write_lvalue ( & l, succ, ACC_WRITE |ACC_READ ) ;
1050+ // see comment on places in
1051+ // propagate_through_place_components ()
1052+ let succ = self . write_place ( & l, succ, ACC_WRITE |ACC_READ ) ;
10531053 let succ = self . propagate_through_expr ( & r, succ) ;
1054- self . propagate_through_lvalue_components ( & l, succ)
1054+ self . propagate_through_place_components ( & l, succ)
10551055 }
10561056 }
10571057
@@ -1121,14 +1121,14 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
11211121
11221122 hir:: ExprInlineAsm ( ref ia, ref outputs, ref inputs) => {
11231123 let succ = ia. outputs . iter ( ) . zip ( outputs) . rev ( ) . fold ( succ, |succ, ( o, output) | {
1124- // see comment on lvalues
1125- // in propagate_through_lvalue_components ()
1124+ // see comment on places
1125+ // in propagate_through_place_components ()
11261126 if o. is_indirect {
11271127 self . propagate_through_expr ( output, succ)
11281128 } else {
11291129 let acc = if o. is_rw { ACC_WRITE |ACC_READ } else { ACC_WRITE } ;
1130- let succ = self . write_lvalue ( output, succ, acc) ;
1131- self . propagate_through_lvalue_components ( output, succ)
1130+ let succ = self . write_place ( output, succ, acc) ;
1131+ self . propagate_through_place_components ( output, succ)
11321132 }
11331133 } ) ;
11341134
@@ -1146,11 +1146,11 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
11461146 }
11471147 }
11481148
1149- fn propagate_through_lvalue_components ( & mut self ,
1149+ fn propagate_through_place_components ( & mut self ,
11501150 expr : & Expr ,
11511151 succ : LiveNode )
11521152 -> LiveNode {
1153- // # Lvalues
1153+ // # Places
11541154 //
11551155 // In general, the full flow graph structure for an
11561156 // assignment/move/etc can be handled in one of two ways,
@@ -1160,15 +1160,15 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
11601160 //
11611161 // The two kinds of graphs are:
11621162 //
1163- // Tracked lvalue Untracked lvalue
1163+ // Tracked place Untracked place
11641164 // ----------------------++-----------------------
11651165 // ||
11661166 // | || |
11671167 // v || v
11681168 // (rvalue) || (rvalue)
11691169 // | || |
11701170 // v || v
1171- // (write of lvalue ) || (lvalue components)
1171+ // (write of place ) || (place components)
11721172 // | || |
11731173 // v || v
11741174 // (succ) || (succ)
@@ -1177,25 +1177,25 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
11771177 //
11781178 // I will cover the two cases in turn:
11791179 //
1180- // # Tracked lvalues
1180+ // # Tracked places
11811181 //
1182- // A tracked lvalue is a local variable/argument `x`. In
1182+ // A tracked place is a local variable/argument `x`. In
11831183 // these cases, the link_node where the write occurs is linked
1184- // to node id of `x`. The `write_lvalue ()` routine generates
1184+ // to node id of `x`. The `write_place ()` routine generates
11851185 // the contents of this node. There are no subcomponents to
11861186 // consider.
11871187 //
1188- // # Non-tracked lvalues
1188+ // # Non-tracked places
11891189 //
1190- // These are lvalues like `x[5]` or `x.f`. In that case, we
1190+ // These are places like `x[5]` or `x.f`. In that case, we
11911191 // basically ignore the value which is written to but generate
11921192 // reads for the components---`x` in these two examples. The
11931193 // components reads are generated by
1194- // `propagate_through_lvalue_components ()` (this fn).
1194+ // `propagate_through_place_components ()` (this fn).
11951195 //
1196- // # Illegal lvalues
1196+ // # Illegal places
11971197 //
1198- // It is still possible to observe assignments to non-lvalues ;
1198+ // It is still possible to observe assignments to non-places ;
11991199 // these errors are detected in the later pass borrowck. We
12001200 // just ignore such cases and treat them as reads.
12011201
@@ -1207,17 +1207,17 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
12071207 }
12081208 }
12091209
1210- // see comment on propagate_through_lvalue ()
1211- fn write_lvalue ( & mut self , expr : & Expr , succ : LiveNode , acc : u32 )
1210+ // see comment on propagate_through_place ()
1211+ fn write_place ( & mut self , expr : & Expr , succ : LiveNode , acc : u32 )
12121212 -> LiveNode {
12131213 match expr. node {
12141214 hir:: ExprPath ( hir:: QPath :: Resolved ( _, ref path) ) => {
12151215 self . access_path ( expr. id , path, succ, acc)
12161216 }
12171217
1218- // We do not track other lvalues , so just propagate through
1218+ // We do not track other places , so just propagate through
12191219 // to their subcomponents. Also, it may happen that
1220- // non-lvalues occur here, because those are detected in the
1220+ // non-places occur here, because those are detected in the
12211221 // later pass borrowck.
12221222 _ => succ
12231223 }
@@ -1363,14 +1363,14 @@ fn check_arm<'a, 'tcx>(this: &mut Liveness<'a, 'tcx>, arm: &'tcx hir::Arm) {
13631363fn check_expr < ' a , ' tcx > ( this : & mut Liveness < ' a , ' tcx > , expr : & ' tcx Expr ) {
13641364 match expr. node {
13651365 hir:: ExprAssign ( ref l, _) => {
1366- this. check_lvalue ( & l) ;
1366+ this. check_place ( & l) ;
13671367
13681368 intravisit:: walk_expr ( this, expr) ;
13691369 }
13701370
13711371 hir:: ExprAssignOp ( _, ref l, _) => {
13721372 if !this. tables . is_method_call ( expr) {
1373- this. check_lvalue ( & l) ;
1373+ this. check_place ( & l) ;
13741374 }
13751375
13761376 intravisit:: walk_expr ( this, expr) ;
@@ -1381,10 +1381,10 @@ fn check_expr<'a, 'tcx>(this: &mut Liveness<'a, 'tcx>, expr: &'tcx Expr) {
13811381 this. visit_expr ( input) ;
13821382 }
13831383
1384- // Output operands must be lvalues
1384+ // Output operands must be places
13851385 for ( o, output) in ia. outputs . iter ( ) . zip ( outputs) {
13861386 if !o. is_indirect {
1387- this. check_lvalue ( output) ;
1387+ this. check_place ( output) ;
13881388 }
13891389 this. visit_expr ( output) ;
13901390 }
@@ -1409,7 +1409,7 @@ fn check_expr<'a, 'tcx>(this: &mut Liveness<'a, 'tcx>, expr: &'tcx Expr) {
14091409}
14101410
14111411impl < ' a , ' tcx > Liveness < ' a , ' tcx > {
1412- fn check_lvalue ( & mut self , expr : & ' tcx Expr ) {
1412+ fn check_place ( & mut self , expr : & ' tcx Expr ) {
14131413 match expr. node {
14141414 hir:: ExprPath ( hir:: QPath :: Resolved ( _, ref path) ) => {
14151415 if let Def :: Local ( nid) = path. def {
@@ -1423,7 +1423,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
14231423 }
14241424 }
14251425 _ => {
1426- // For other kinds of lvalues , no checks are required,
1426+ // For other kinds of places , no checks are required,
14271427 // and any embedded expressions are actually rvalues
14281428 intravisit:: walk_expr ( self , expr) ;
14291429 }
0 commit comments