@@ -371,14 +371,14 @@ struct RegionResolutionVisitor<'tcx> {
371
371
372
372
// The number of expressions and patterns visited in the current body
373
373
expr_and_pat_count : usize ,
374
- // When this is ' true' , we record the Scopes we encounter
374
+ // When this is ` true` , we record the ` Scopes` we encounter
375
375
// when processing a Yield expression. This allows us to fix
376
376
// up their indices.
377
377
pessimistic_yield : bool ,
378
378
// Stores scopes when pessimistic_yield is true.
379
379
// Each time we encounter an ExprKind::AssignOp, we push
380
- // a new Vec into the outermost Vec. This inner Vec is uesd
381
- // to store any scopes we encounter when visiting the inenr expressions
380
+ // a new Vec into the outermost Vec. This inner Vec is used
381
+ // to store any scopes we encounter when visiting the inner expressions
382
382
// of the AssignOp. Once we finish visiting the inner expressions, we pop
383
383
// off the inner Vec, and process the Scopes it contains.
384
384
// This allows us to handle nested AssignOps - while a terrible idea,
@@ -963,9 +963,9 @@ fn resolve_expr<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, expr: &'tcx h
963
963
let prev_pessimistic = visitor. pessimistic_yield ;
964
964
965
965
// Ordinarily, we can rely on the visit order of HIR intravisit
966
- // to correspond to the actual exectuion order of statements.
966
+ // to correspond to the actual execution order of statements.
967
967
// However, there's a weird corner case with compund assignment
968
- // operators (e.g. ' a += b' ). The evaluation order depends on whether
968
+ // operators (e.g. ` a += b` ). The evaluation order depends on whether
969
969
// or not the operator is overloaded (e.g. whether or not a trait
970
970
// like AddAssign is implemented).
971
971
@@ -996,10 +996,10 @@ fn resolve_expr<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, expr: &'tcx h
996
996
// To determine the actual execution order, we need to perform
997
997
// trait resolution. Unfortunately, we need to be able to compute
998
998
// yield_in_scope before type checking is even done, as it gets
999
- // used by AST borrowcheck
999
+ // used by AST borrowcheck.
1000
1000
//
1001
1001
// Fortunately, we don't need to know the actual execution order.
1002
- // It sufficies to know the 'worst case' order with respect to yields.
1002
+ // It suffices to know the 'worst case' order with respect to yields.
1003
1003
// Specifically, we need to know the highest 'expr_and_pat_count'
1004
1004
// that we could assign to the yield expression. To do this,
1005
1005
// we pick the greater of the two values from the left-hand
@@ -1029,7 +1029,7 @@ fn resolve_expr<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, expr: &'tcx h
1029
1029
1030
1030
// If the actual execution order turns out to be right-to-left,
1031
1031
// then we're fine. However, if the actual execution order is left-to-right,
1032
- // then we'll assign too low of a count to any ' yield' expressions
1032
+ // then we'll assign too low a count to any ` yield` expressions
1033
1033
// we encounter in 'right_expression' - they should really occur after all of the
1034
1034
// expressions in 'left_expression'.
1035
1035
visitor. visit_expr ( & right_expression) ;
@@ -1474,7 +1474,7 @@ fn region_scope_tree<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx ScopeTree
1474
1474
} ,
1475
1475
terminating_scopes : Default :: default ( ) ,
1476
1476
pessimistic_yield : false ,
1477
- fixup_scopes : vec ! [ ]
1477
+ fixup_scopes : vec ! [ ] ,
1478
1478
} ;
1479
1479
1480
1480
let body = tcx. hir ( ) . body ( body_id) ;
0 commit comments