about summary refs log tree commit diff
path: root/clippy_utils
diff options
context:
space:
mode:
authoryanglsh <yanglsh@shanghaitech.edu.cn>2025-05-25 02:02:11 +0800
committeryanglsh <yanglsh@shanghaitech.edu.cn>2025-05-25 02:02:11 +0800
commit03af37302c09ad11024929186a7718f4dc87f5cc (patch)
treeb71c78d9245f975f98e2fa8d7755d08c3719a64c /clippy_utils
parent1029572c192cd3bff1a15e0411871ed33b2bdf94 (diff)
downloadrust-03af37302c09ad11024929186a7718f4dc87f5cc.tar.gz
rust-03af37302c09ad11024929186a7718f4dc87f5cc.zip
fix: `assign_op_pattern` FP on unstable const trait
Diffstat (limited to 'clippy_utils')
-rw-r--r--clippy_utils/src/qualify_min_const_fn.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/clippy_utils/src/qualify_min_const_fn.rs b/clippy_utils/src/qualify_min_const_fn.rs
index 45da266fd8a..2bf7eb703d4 100644
--- a/clippy_utils/src/qualify_min_const_fn.rs
+++ b/clippy_utils/src/qualify_min_const_fn.rs
@@ -393,7 +393,8 @@ fn check_terminator<'tcx>(
     }
 }
 
-fn is_stable_const_fn(cx: &LateContext<'_>, def_id: DefId, msrv: Msrv) -> bool {
+/// Checks if the given `def_id` is a stable const fn, in respect to the given MSRV.
+pub fn is_stable_const_fn(cx: &LateContext<'_>, def_id: DefId, msrv: Msrv) -> bool {
     cx.tcx.is_const_fn(def_id)
         && cx
             .tcx