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 11use clippy_utils:: diagnostics:: span_lint_and_then;
22use clippy_utils:: msrvs:: Msrv ;
3- use clippy_utils:: qualify_min_const_fn:: is_stable_const_fn;
43use clippy_utils:: source:: SpanRangeExt ;
54use clippy_utils:: ty:: implements_trait;
65use clippy_utils:: visitors:: for_each_expr_without_closures;
@@ -21,7 +20,7 @@ pub(super) fn check<'tcx>(
2120 expr : & ' tcx hir:: Expr < ' _ > ,
2221 assignee : & ' tcx hir:: Expr < ' _ > ,
2322 e : & ' tcx hir:: Expr < ' _ > ,
24- msrv : Msrv ,
23+ _msrv : Msrv ,
2524) {
2625 if let hir:: ExprKind :: Binary ( op, l, r) = & e. kind {
2726 let lint = |assignee : & hir:: Expr < ' _ > , rhs : & hir:: Expr < ' _ > | {
@@ -45,10 +44,8 @@ pub(super) fn check<'tcx>(
4544 }
4645
4746 // 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) {
5249 return ;
5350 }
5451
You can’t perform that action at this time.
0 commit comments