Skip to content

Commit a5469b8

Browse files
committed
Constify remaining operators
1 parent 0a70523 commit a5469b8

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

clippy_lints/src/operators/assign_op_pattern.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use clippy_utils::diagnostics::span_lint_and_then;
22
use clippy_utils::msrvs::Msrv;
3-
use clippy_utils::qualify_min_const_fn::is_stable_const_fn;
43
use clippy_utils::source::SpanRangeExt;
54
use clippy_utils::ty::implements_trait;
65
use 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

0 commit comments

Comments
 (0)