@@ -7,7 +7,6 @@ use rustc_infer::infer::canonical::{
7
7
Canonical , CanonicalExt as _, CanonicalQueryInput , CanonicalVarInfo , CanonicalVarValues ,
8
8
} ;
9
9
use rustc_infer:: infer:: { InferCtxt , RegionVariableOrigin , TyCtxtInferExt } ;
10
- use rustc_infer:: traits:: ObligationCause ;
11
10
use rustc_infer:: traits:: solve:: Goal ;
12
11
use rustc_middle:: ty:: fold:: TypeFoldable ;
13
12
use rustc_middle:: ty:: { self , Ty , TyCtxt , TypeVisitableExt as _} ;
@@ -222,7 +221,6 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<
222
221
// register candidates. We probably need to register >1 since we may have an OR of ANDs.
223
222
fn is_transmutable (
224
223
& self ,
225
- param_env : ty:: ParamEnv < ' tcx > ,
226
224
dst : Ty < ' tcx > ,
227
225
src : Ty < ' tcx > ,
228
226
assume : ty:: Const < ' tcx > ,
@@ -231,16 +229,14 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<
231
229
// which will ICE for region vars.
232
230
let ( dst, src) = self . tcx . erase_regions ( ( dst, src) ) ;
233
231
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 {
235
233
return Err ( NoSolution ) ;
236
234
} ;
237
235
238
236
// 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
+ {
244
240
rustc_transmute:: Answer :: Yes => Ok ( Certainty :: Yes ) ,
245
241
rustc_transmute:: Answer :: No ( _) | rustc_transmute:: Answer :: If ( _) => Err ( NoSolution ) ,
246
242
}
0 commit comments