mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
add opt in attribute for stable-in-unstable items
This commit is contained in:
parent
1e033a9818
commit
d053a3dae0
1 changed files with 1 additions and 1 deletions
|
@ -353,7 +353,7 @@ fn check_terminator<'a, 'tcx>(
|
||||||
fn is_const_fn(tcx: TyCtxt<'_>, def_id: DefId, msrv: Option<RustcVersion>) -> bool {
|
fn is_const_fn(tcx: TyCtxt<'_>, def_id: DefId, msrv: Option<RustcVersion>) -> bool {
|
||||||
tcx.is_const_fn(def_id)
|
tcx.is_const_fn(def_id)
|
||||||
&& tcx.lookup_const_stability(def_id).map_or(true, |const_stab| {
|
&& tcx.lookup_const_stability(def_id).map_or(true, |const_stab| {
|
||||||
if let rustc_attr::StabilityLevel::Stable { since } = const_stab.level {
|
if let rustc_attr::StabilityLevel::Stable { since, .. } = const_stab.level {
|
||||||
// Checking MSRV is manually necessary because `rustc` has no such concept. This entire
|
// Checking MSRV is manually necessary because `rustc` has no such concept. This entire
|
||||||
// function could be removed if `rustc` provided a MSRV-aware version of `is_const_fn`.
|
// function could be removed if `rustc` provided a MSRV-aware version of `is_const_fn`.
|
||||||
// as a part of an unimplemented MSRV check https://github.com/rust-lang/rust/issues/65262.
|
// as a part of an unimplemented MSRV check https://github.com/rust-lang/rust/issues/65262.
|
||||||
|
|
Loading…
Reference in a new issue