File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
compiler/rustc_ast_lowering/src Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -1559,13 +1559,14 @@ impl<'hir> LoweringContext<'_, 'hir> {
15591559
15601560 /// Desugar `ExprKind::Try` from: `<expr>?` into:
15611561 /// ```rust
1562- /// match Try::into_result(<expr>) {
1563- /// Ok(val) => #[allow(unreachable_code)] val,
1564- /// Err(err) => #[allow(unreachable_code)]
1565- /// // If there is an enclosing `try {...}`:
1566- /// break 'catch_target Try::from_error(From::from(err)),
1567- /// // Otherwise:
1568- /// return Try::from_error(From::from(err)),
1562+ /// match Try::branch(<expr>) {
1563+ /// ControlFlow::Continue(val) => #[allow(unreachable_code)] val,,
1564+ /// ControlFlow::Break(residual) =>
1565+ /// #[allow(unreachable_code)]
1566+ /// // If there is an enclosing `try {...}`:
1567+ /// break 'catch_target Try::from_residual(residual),
1568+ /// // Otherwise:
1569+ /// return Try::from_residual(residual),
15691570 /// }
15701571 /// ```
15711572 fn lower_expr_try ( & mut self , span : Span , sub_expr : & Expr ) -> hir:: ExprKind < ' hir > {
You can’t perform that action at this time.
0 commit comments