Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit b51c477

Browse files
committed
temporarily fix clippy issues to run tests
1 parent 18c17fa commit b51c477

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tools/clippy/clippy_lints/src/missing_const_for_fn.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ impl<'tcx> LateLintPass<'tcx> for MissingConstForFn {
154154
return;
155155
}
156156

157-
let mir = cx.tcx.optimized_mir(def_id);
157+
let mir = cx.tcx.mir_drops_elaborated_and_const_checked(def_id);
158158

159-
if let Ok(()) = is_min_const_fn(cx.tcx, mir, &self.msrv)
160-
&& let hir::Node::Item(hir::Item { vis_span, .. }) | hir::Node::ImplItem(hir::ImplItem { vis_span, .. }) =
159+
if let Ok(()) = is_min_const_fn(cx.tcx,& mir.borrow(), &self.msrv)
160+
&& let hir::Node::Item(hir::Item { vis_span, .. }) | hir::Node::ImplItem(hir::ImplItem { vis_span, .. }) =
161161
cx.tcx.hir_node_by_def_id(def_id)
162162
{
163163
let suggestion = if vis_span.is_empty() { "const " } else { " const" };

0 commit comments

Comments
 (0)