Rollup merge of #131984 - dingxiangfei2009:stabilize-if-let-rescope, r=traviscross,lcnr
Stabilize if_let_rescope Close #131154 Tracked by #124085
This commit is contained in:
commit
5d6c49938e
20 changed files with 30 additions and 84 deletions
|
@ -464,8 +464,7 @@ fn resolve_expr<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, expr: &'tcx h
|
|||
|
||||
hir::ExprKind::If(cond, then, Some(otherwise)) => {
|
||||
let expr_cx = visitor.cx;
|
||||
let data = if expr.span.at_least_rust_2024() && visitor.tcx.features().if_let_rescope()
|
||||
{
|
||||
let data = if expr.span.at_least_rust_2024() {
|
||||
ScopeData::IfThenRescope
|
||||
} else {
|
||||
ScopeData::IfThen
|
||||
|
@ -480,8 +479,7 @@ fn resolve_expr<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, expr: &'tcx h
|
|||
|
||||
hir::ExprKind::If(cond, then, None) => {
|
||||
let expr_cx = visitor.cx;
|
||||
let data = if expr.span.at_least_rust_2024() && visitor.tcx.features().if_let_rescope()
|
||||
{
|
||||
let data = if expr.span.at_least_rust_2024() {
|
||||
ScopeData::IfThenRescope
|
||||
} else {
|
||||
ScopeData::IfThen
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue