Skip to content

Commit a23b3e1

Browse files
committed
clippy: update is_stable_const_fn helper for multiple const-stability attrs
1 parent 072aabd commit a23b3e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,8 @@ fn is_stable_const_fn(tcx: TyCtxt<'_>, def_id: DefId, msrv: &Msrv) -> bool {
394394
msrv.meets(const_stab_rust_version)
395395
} else {
396396
// Unstable const fn, check if the feature is enabled.
397-
tcx.features().enabled(const_stab.feature) && msrv.current().is_none()
397+
tcx.features().all_enabled(const_stab.unstable_features())
398+
&& msrv.current().is_none()
398399
}
399400
})
400401
}

0 commit comments

Comments
 (0)