stabilize if_let_rescope
This commit is contained in:
parent
be01dabfef
commit
6d569f769c
20 changed files with 30 additions and 84 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue