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 @@ -1097,7 +1097,7 @@ impl<'tcx> Ty<'tcx> {
1097
1097
// This doesn't depend on regions, so try to minimize distinct
1098
1098
// query keys used.
1099
1099
// If normalization fails, we just use `query_ty`.
1100
- let param_env = tcx . erase_regions ( param_env ) ;
1100
+ debug_assert ! ( ! param_env. has_infer ( ) ) ;
1101
1101
let query_ty = tcx
1102
1102
. try_normalize_erasing_regions ( param_env, query_ty)
1103
1103
. 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