Update the comment on lower_expr_try

I'd updated the ones inside the method, but not its doc comment.
This commit is contained in:
Scott McMurray 2021-07-09 00:13:44 -07:00
parent aa65b08b1d
commit 099a357e5c

View file

@ -1559,13 +1559,14 @@ impl<'hir> LoweringContext<'_, 'hir> {
/// Desugar `ExprKind::Try` from: `<expr>?` into:
/// ```rust
/// match Try::into_result(<expr>) {
/// Ok(val) => #[allow(unreachable_code)] val,
/// Err(err) => #[allow(unreachable_code)]
/// match Try::branch(<expr>) {
/// ControlFlow::Continue(val) => #[allow(unreachable_code)] val,,
/// ControlFlow::Break(residual) =>
/// #[allow(unreachable_code)]
/// // If there is an enclosing `try {...}`:
/// break 'catch_target Try::from_error(From::from(err)),
/// break 'catch_target Try::from_residual(residual),
/// // Otherwise:
/// return Try::from_error(From::from(err)),
/// return Try::from_residual(residual),
/// }
/// ```
fn lower_expr_try(&mut self, span: Span, sub_expr: &Expr) -> hir::ExprKind<'hir> {