@@ -509,17 +509,17 @@ fn resolve_local<'tcx>(
509
509
visitor. visit_pat ( pat) ;
510
510
}
511
511
512
- /// Returns `true` if `pat` match the `P&` non-terminal.
513
- ///
514
- /// ```text
515
- /// P& = ref X
516
- /// | StructName { ..., P&, ... }
517
- /// | VariantName(..., P&, ...)
518
- /// | [ ..., P&, ... ]
519
- /// | ( ..., P&, ... )
520
- /// | ... "|" P& "|" ...
521
- /// | box P&
522
- /// ```
512
+ // Returns `true` if `pat` match the `P&` non-terminal.
513
+ //
514
+ // ```text
515
+ // P& = ref X
516
+ // | StructName { ..., P&, ... }
517
+ // | VariantName(..., P&, ...)
518
+ // | [ ..., P&, ... ]
519
+ // | ( ..., P&, ... )
520
+ // | ... "|" P& "|" ...
521
+ // | box P&
522
+ // ```
523
523
fn is_binding_pat ( pat : & hir:: Pat < ' _ > ) -> bool {
524
524
// Note that the code below looks for *explicit* refs only, that is, it won't
525
525
// know about *implicit* refs as introduced in #42640.
@@ -576,18 +576,18 @@ fn resolve_local<'tcx>(
576
576
}
577
577
}
578
578
579
- /// If `expr` matches the `E&` grammar, then records an extended rvalue scope as appropriate:
580
- ///
581
- /// ```text
582
- /// E& = & ET
583
- /// | StructName { ..., f: E&, ... }
584
- /// | [ ..., E&, ... ]
585
- /// | ( ..., E&, ... )
586
- /// | {...; E&}
587
- /// | box E&
588
- /// | E& as ...
589
- /// | ( E& )
590
- /// ```
579
+ // If `expr` matches the `E&` grammar, then records an extended rvalue scope as appropriate:
580
+ //
581
+ // ```text
582
+ // E& = & ET
583
+ // | StructName { ..., f: E&, ... }
584
+ // | [ ..., E&, ... ]
585
+ // | ( ..., E&, ... )
586
+ // | {...; E&}
587
+ // | box E&
588
+ // | E& as ...
589
+ // | ( E& )
590
+ // ```
591
591
fn record_rvalue_scope_if_borrow_expr < ' tcx > (
592
592
visitor : & mut RegionResolutionVisitor < ' tcx > ,
593
593
expr : & hir:: Expr < ' _ > ,
@@ -620,23 +620,23 @@ fn resolve_local<'tcx>(
620
620
}
621
621
}
622
622
623
- /// Applied to an expression `expr` if `expr` -- or something owned or partially owned by
624
- /// `expr` -- is going to be indirectly referenced by a variable in a let statement. In that
625
- /// case, the "temporary lifetime" or `expr` is extended to be the block enclosing the `let`
626
- /// statement.
627
- ///
628
- /// More formally, if `expr` matches the grammar `ET`, record the rvalue scope of the matching
629
- /// `<rvalue>` as `blk_id`:
630
- ///
631
- /// ```text
632
- /// ET = *ET
633
- /// | ET[...]
634
- /// | ET.f
635
- /// | (ET)
636
- /// | <rvalue>
637
- /// ```
638
- ///
639
- /// Note: ET is intended to match "rvalues or places based on rvalues".
623
+ // Applied to an expression `expr` if `expr` -- or something owned or partially owned by
624
+ // `expr` -- is going to be indirectly referenced by a variable in a let statement. In that
625
+ // case, the "temporary lifetime" or `expr` is extended to be the block enclosing the `let`
626
+ // statement.
627
+ //
628
+ // More formally, if `expr` matches the grammar `ET`, record the rvalue scope of the matching
629
+ // `<rvalue>` as `blk_id`:
630
+ //
631
+ // ```text
632
+ // ET = *ET
633
+ // | ET[...]
634
+ // | ET.f
635
+ // | (ET)
636
+ // | <rvalue>
637
+ // ```
638
+ //
639
+ // Note: ET is intended to match "rvalues or places based on rvalues".
640
640
fn record_rvalue_scope < ' tcx > (
641
641
visitor : & mut RegionResolutionVisitor < ' tcx > ,
642
642
expr : & hir:: Expr < ' _ > ,
0 commit comments