Skip to content

Commit be0b4d5

Browse files
committed
Remove constness from ParamEnv
1 parent 8615595 commit be0b4d5

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

clippy_lints/src/derive.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use rustc_errors::Applicability;
66
use rustc_hir::def_id::DefId;
77
use rustc_hir::intravisit::{walk_expr, walk_fn, walk_item, FnKind, Visitor};
88
use rustc_hir::{
9-
self as hir, BlockCheckMode, BodyId, Constness, Expr, ExprKind, FnDecl, Impl, Item, ItemKind, UnsafeSource,
9+
self as hir, BlockCheckMode, BodyId, Expr, ExprKind, FnDecl, Impl, Item, ItemKind, UnsafeSource,
1010
Unsafety,
1111
};
1212
use rustc_lint::{LateContext, LateLintPass};
@@ -526,6 +526,5 @@ fn param_env_for_derived_eq(tcx: TyCtxt<'_>, did: DefId, eq_trait_id: DefId) ->
526526
}),
527527
)),
528528
Reveal::UserFacing,
529-
Constness::NotConst,
530529
)
531530
}

clippy_lints/src/manual_float_methods.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl Variant {
8383
impl<'tcx> LateLintPass<'tcx> for ManualFloatMethods {
8484
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) {
8585
if !in_external_macro(cx.sess(), expr.span)
86-
&& (!cx.param_env.is_const() || cx.tcx.features().active(sym!(const_float_classify)))
86+
&& cx.tcx.features().active(sym!(const_float_classify))
8787
&& let ExprKind::Binary(kind, lhs, rhs) = expr.kind
8888
&& let ExprKind::Binary(lhs_kind, lhs_lhs, lhs_rhs) = lhs.kind
8989
&& let ExprKind::Binary(rhs_kind, rhs_lhs, rhs_rhs) = rhs.kind

clippy_utils/src/qualify_min_const_fn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ fn is_ty_const_destruct<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, body: &Body<'tcx>
399399
let obligation = Obligation::new(
400400
tcx,
401401
ObligationCause::dummy_with_span(body.span),
402-
ConstCx::new(tcx, body).param_env.with_const(),
402+
ConstCx::new(tcx, body).param_env,
403403
TraitRef::from_lang_item(tcx, LangItem::Destruct, body.span, [ty]).with_constness(BoundConstness::ConstIfConst),
404404
);
405405

0 commit comments

Comments
 (0)