@@ -7,7 +7,6 @@ use rustc_infer::infer::canonical::{
77 Canonical , CanonicalExt as _, CanonicalQueryInput , CanonicalVarInfo , CanonicalVarValues ,
88} ;
99use rustc_infer:: infer:: { InferCtxt , RegionVariableOrigin , TyCtxtInferExt } ;
10- use rustc_infer:: traits:: ObligationCause ;
1110use rustc_infer:: traits:: solve:: Goal ;
1211use rustc_middle:: ty:: fold:: TypeFoldable ;
1312use rustc_middle:: ty:: { self , Ty , TyCtxt , TypeVisitableExt as _} ;
@@ -222,7 +221,6 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<
222221 // register candidates. We probably need to register >1 since we may have an OR of ANDs.
223222 fn is_transmutable (
224223 & self ,
225- param_env : ty:: ParamEnv < ' tcx > ,
226224 dst : Ty < ' tcx > ,
227225 src : Ty < ' tcx > ,
228226 assume : ty:: Const < ' tcx > ,
@@ -231,16 +229,14 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<
231229 // which will ICE for region vars.
232230 let ( dst, src) = self . tcx . erase_regions ( ( dst, src) ) ;
233231
234- let Some ( assume) = rustc_transmute:: Assume :: from_const ( self . tcx , param_env , assume) else {
232+ let Some ( assume) = rustc_transmute:: Assume :: from_const ( self . tcx , assume) else {
235233 return Err ( NoSolution ) ;
236234 } ;
237235
238236 // FIXME(transmutability): This really should be returning nested goals for `Answer::If*`
239- match rustc_transmute:: TransmuteTypeEnv :: new ( & self . 0 ) . is_transmutable (
240- ObligationCause :: dummy ( ) ,
241- rustc_transmute:: Types { src, dst } ,
242- assume,
243- ) {
237+ match rustc_transmute:: TransmuteTypeEnv :: new ( self . 0 . tcx )
238+ . is_transmutable ( rustc_transmute:: Types { src, dst } , assume)
239+ {
244240 rustc_transmute:: Answer :: Yes => Ok ( Certainty :: Yes ) ,
245241 rustc_transmute:: Answer :: No ( _) | rustc_transmute:: Answer :: If ( _) => Err ( NoSolution ) ,
246242 }
0 commit comments