@@ -512,13 +512,15 @@ fn resolve_local<'tcx>(
512
512
513
513
/// Returns `true` if `pat` match the `P&` non-terminal.
514
514
///
515
+ /// ```text
515
516
/// P& = ref X
516
517
/// | StructName { ..., P&, ... }
517
518
/// | VariantName(..., P&, ...)
518
519
/// | [ ..., P&, ... ]
519
520
/// | ( ..., P&, ... )
520
521
/// | ... "|" P& "|" ...
521
522
/// | box P&
523
+ /// ```
522
524
fn is_binding_pat ( pat : & hir:: Pat < ' _ > ) -> bool {
523
525
// Note that the code below looks for *explicit* refs only, that is, it won't
524
526
// know about *implicit* refs as introduced in #42640.
@@ -575,6 +577,7 @@ fn resolve_local<'tcx>(
575
577
576
578
/// If `expr` matches the `E&` grammar, then records an extended rvalue scope as appropriate:
577
579
///
580
+ /// ```text
578
581
/// E& = & ET
579
582
/// | StructName { ..., f: E&, ... }
580
583
/// | [ ..., E&, ... ]
@@ -583,6 +586,7 @@ fn resolve_local<'tcx>(
583
586
/// | box E&
584
587
/// | E& as ...
585
588
/// | ( E& )
589
+ /// ```
586
590
fn record_rvalue_scope_if_borrow_expr < ' tcx > (
587
591
visitor : & mut RegionResolutionVisitor < ' tcx > ,
588
592
expr : & hir:: Expr < ' _ > ,
@@ -623,11 +627,13 @@ fn resolve_local<'tcx>(
623
627
/// More formally, if `expr` matches the grammar `ET`, record the rvalue scope of the matching
624
628
/// `<rvalue>` as `blk_id`:
625
629
///
630
+ /// ```text
626
631
/// ET = *ET
627
632
/// | ET[...]
628
633
/// | ET.f
629
634
/// | (ET)
630
635
/// | <rvalue>
636
+ /// ```
631
637
///
632
638
/// Note: ET is intended to match "rvalues or places based on rvalues".
633
639
fn record_rvalue_scope < ' tcx > (
0 commit comments