diff --git a/clippy_lints/src/missing_const_for_fn.rs b/clippy_lints/src/missing_const_for_fn.rs index eb2a3220a04e..7d5084cfe1c5 100644 --- a/clippy_lints/src/missing_const_for_fn.rs +++ b/clippy_lints/src/missing_const_for_fn.rs @@ -109,7 +109,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingConstForFn { let mir = cx.tcx.optimized_mir(def_id); if let Err((span, err)) = is_min_const_fn(cx.tcx, def_id, &mir) { - if cx.tcx.is_min_const_fn(def_id) { + if rustc_mir::const_eval::is_min_const_fn(cx.tcx, def_id) { cx.tcx.sess.span_err(span, &err); } } else {