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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user