File tree 2 files changed +2
-2
lines changed
rustc_trait_selection/src/traits/query
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1107,7 +1107,7 @@ impl<'tcx> Ty<'tcx> {
1107
1107
// This doesn't depend on regions, so try to minimize distinct
1108
1108
// query keys used.
1109
1109
// If normalization fails, we just use `query_ty`.
1110
- let param_env = tcx . erase_regions ( param_env ) ;
1110
+ debug_assert ! ( ! param_env. has_infer ( ) ) ;
1111
1111
let query_ty = tcx
1112
1112
. try_normalize_erasing_regions ( param_env, query_ty)
1113
1113
. unwrap_or_else ( |_| tcx. erase_regions ( query_ty) ) ;
Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ pub fn dtorck_constraint_for_ty_inner<'tcx>(
298
298
// While we conservatively assume that all coroutines require drop
299
299
// to avoid query cycles during MIR building, we can check the actual
300
300
// witness during borrowck to avoid unnecessary liveness constraints.
301
- if args. witness ( ) . needs_drop ( tcx, param_env) {
301
+ if args. witness ( ) . needs_drop ( tcx, tcx . erase_regions ( param_env) ) {
302
302
constraints. outlives . extend ( args. upvar_tys ( ) . iter ( ) . map ( ty:: GenericArg :: from) ) ;
303
303
constraints. outlives . push ( args. resume_ty ( ) . into ( ) ) ;
304
304
}
You can’t perform that action at this time.
0 commit comments