File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
clippy_lints/src/operators Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 1
1
use clippy_utils:: diagnostics:: span_lint_and_then;
2
2
use clippy_utils:: msrvs:: Msrv ;
3
- use clippy_utils:: qualify_min_const_fn:: is_stable_const_fn;
4
3
use clippy_utils:: source:: SpanRangeExt ;
5
4
use clippy_utils:: ty:: implements_trait;
6
5
use clippy_utils:: visitors:: for_each_expr_without_closures;
@@ -21,7 +20,7 @@ pub(super) fn check<'tcx>(
21
20
expr : & ' tcx hir:: Expr < ' _ > ,
22
21
assignee : & ' tcx hir:: Expr < ' _ > ,
23
22
e : & ' tcx hir:: Expr < ' _ > ,
24
- msrv : Msrv ,
23
+ _msrv : Msrv ,
25
24
) {
26
25
if let hir:: ExprKind :: Binary ( op, l, r) = & e. kind {
27
26
let lint = |assignee : & hir:: Expr < ' _ > , rhs : & hir:: Expr < ' _ > | {
@@ -45,10 +44,8 @@ pub(super) fn check<'tcx>(
45
44
}
46
45
47
46
// Skip if the trait is not stable in const contexts
48
- if is_in_const_context ( cx)
49
- && let Some ( binop_id) = cx. tcx . associated_item_def_ids ( trait_id) . first ( )
50
- && !is_stable_const_fn ( cx, * binop_id, msrv)
51
- {
47
+ // FIXME: reintroduce a better check after this is merged back into Clippy
48
+ if is_in_const_context ( cx) {
52
49
return ;
53
50
}
54
51
You can’t perform that action at this time.
0 commit comments