Skip to content

Commit 6dc9746

Browse files
committed
Auto merge of rust-lang#95956 - yaahc:stable-in-unstable, r=cjgillot
Support unstable moves via stable in unstable items part of https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/moving.20items.20to.20core.20unstably and a blocker of rust-lang#90328. The libs-api team needs the ability to move an already stable item to a new location unstably, in this case for Error in core. Otherwise these changes are insta-stable making them much harder to merge. This PR attempts to solve the problem by checking the stability of path segments as well as the last item in the path itself, which is currently the only thing checked.
2 parents c9a78ee + d053a3d commit 6dc9746

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_utils/src/qualify_min_const_fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ fn check_terminator<'a, 'tcx>(
354354
fn is_const_fn(tcx: TyCtxt<'_>, def_id: DefId, msrv: Option<RustcVersion>) -> bool {
355355
tcx.is_const_fn(def_id)
356356
&& tcx.lookup_const_stability(def_id).map_or(true, |const_stab| {
357-
if let rustc_attr::StabilityLevel::Stable { since } = const_stab.level {
357+
if let rustc_attr::StabilityLevel::Stable { since, .. } = const_stab.level {
358358
// Checking MSRV is manually necessary because `rustc` has no such concept. This entire
359359
// function could be removed if `rustc` provided a MSRV-aware version of `is_const_fn`.
360360
// as a part of an unimplemented MSRV check https://github.com/rust-lang/rust/issues/65262.

0 commit comments

Comments
 (0)