about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/if_let_rescope.rs
diff options
context:
space:
mode:
authorDing Xiang Fei <dingxiangfei2009@protonmail.ch>2024-10-21 05:06:30 +0800
committerDing Xiang Fei <dingxiangfei2009@protonmail.ch>2024-10-24 04:33:14 +0800
commit6d569f769c3d7becbd566b4fec5baf9f11e098e1 (patch)
tree5450fea30f0562ebb104bef2ccdb721458e6cc31 /compiler/rustc_lint/src/if_let_rescope.rs
parentbe01dabfefd2daa4574b974f571c7852085d60cb (diff)
downloadrust-6d569f769c3d7becbd566b4fec5baf9f11e098e1.tar.gz
rust-6d569f769c3d7becbd566b4fec5baf9f11e098e1.zip
stabilize if_let_rescope
Diffstat (limited to 'compiler/rustc_lint/src/if_let_rescope.rs')
-rw-r--r--compiler/rustc_lint/src/if_let_rescope.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/if_let_rescope.rs b/compiler/rustc_lint/src/if_let_rescope.rs
index bdfcc2c0a10..afcfbebc14b 100644
--- a/compiler/rustc_lint/src/if_let_rescope.rs
+++ b/compiler/rustc_lint/src/if_let_rescope.rs
@@ -24,7 +24,6 @@ declare_lint! {
     /// ### Example
     ///
     /// ```rust,edition2021
-    /// #![feature(if_let_rescope)]
     /// #![warn(if_let_rescope)]
     /// #![allow(unused_variables)]
     ///
@@ -243,7 +242,7 @@ impl_lint_pass!(
 
 impl<'tcx> LateLintPass<'tcx> for IfLetRescope {
     fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) {
-        if expr.span.edition().at_least_rust_2024() || !cx.tcx.features().if_let_rescope() {
+        if expr.span.edition().at_least_rust_2024() {
             return;
         }
         if let (Level::Allow, _) = cx.tcx.lint_level_at_node(IF_LET_RESCOPE, expr.hir_id) {