Remove constness from ParamEnv

This commit is contained in:
Deadbeef 2023-07-27 15:50:42 +00:00
parent 8615595021
commit be0b4d5a9b
3 changed files with 3 additions and 4 deletions

View file

@ -399,7 +399,7 @@ fn is_ty_const_destruct<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, body: &Body<'tcx>
let obligation = Obligation::new(
tcx,
ObligationCause::dummy_with_span(body.span),
ConstCx::new(tcx, body).param_env.with_const(),
ConstCx::new(tcx, body).param_env,
TraitRef::from_lang_item(tcx, LangItem::Destruct, body.span, [ty]).with_constness(BoundConstness::ConstIfConst),
);