@@ -454,11 +454,19 @@ pub struct FnCtxt<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
454
454
ps : RefCell < UnsafetyState > ,
455
455
456
456
/// Whether the last checked node generates a divergence (e.g.,
457
- /// `return` will set this to Always). In general, this is
458
- /// typically set to *Maybe* on the way **down** the tree, and
459
- /// then values are propagated **up** the tree. In a block, we
460
- /// combine the results from statements and propagate the
461
- /// end-result up.
457
+ /// `return` will set this to Always). In general, when entering
458
+ /// an expression or other node in the tree, the initial value
459
+ /// indicates whether prior parts of the containing expression may
460
+ /// have diverged. It is then typically set to `Maybe` (and the
461
+ /// old value remembered) for processing the subparts of the
462
+ /// current expression. As each subpart is processed, they may set
463
+ /// the flag to `Always` etc. Finally, at the end, we take the
464
+ /// result and "union" it with the original value, so that when we
465
+ /// return the flag indicates if any subpart of the the parent
466
+ /// expression (up to and including this part) has diverged. So,
467
+ /// if you read it after evaluating a subexpression `X`, the value
468
+ /// you get indicates whether any subexpression that was
469
+ /// evaluating up to and including `X` diverged.
462
470
///
463
471
/// We use this flag for two purposes:
464
472
///
0 commit comments