Skip to content

Commit 6d18c99

Browse files
authored
Rollup merge of rust-lang#88963 - fee1-dead:const-iterator, r=oli-obk
Coerce const FnDefs to implement const Fn traits You can now pass a FnDef to a function expecting `F` where `F: ~const FnTrait`. r? ``@oli-obk`` ``@rustbot`` label T-compiler F-const_trait_impl
2 parents 730d86f + 3e5f80f commit 6d18c99

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

clippy_utils/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
extern crate rustc_ast;
1919
extern crate rustc_ast_pretty;
2020
extern crate rustc_attr;
21-
extern crate rustc_const_eval;
2221
extern crate rustc_data_structures;
2322
extern crate rustc_errors;
2423
extern crate rustc_hir;

clippy_utils/src/qualify_min_const_fn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ fn check_terminator(
364364
}
365365

366366
fn is_const_fn(tcx: TyCtxt<'_>, def_id: DefId, msrv: Option<&RustcVersion>) -> bool {
367-
rustc_const_eval::const_eval::is_const_fn(tcx, def_id)
367+
tcx.is_const_fn(def_id)
368368
&& tcx.lookup_const_stability(def_id).map_or(true, |const_stab| {
369369
if let rustc_attr::StabilityLevel::Stable { since } = const_stab.level {
370370
// Checking MSRV is manually necessary because `rustc` has no such concept. This entire

0 commit comments

Comments
 (0)