File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
rustc_trait_selection/src/traits/query Expand file tree Collapse file tree 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> {
11071107 // This doesn't depend on regions, so try to minimize distinct
11081108 // query keys used.
11091109 // If normalization fails, we just use `query_ty`.
1110- let param_env = tcx . erase_regions ( param_env ) ;
1110+ debug_assert ! ( ! param_env. has_infer ( ) ) ;
11111111 let query_ty = tcx
11121112 . try_normalize_erasing_regions ( param_env, query_ty)
11131113 . 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>(
298298 // While we conservatively assume that all coroutines require drop
299299 // to avoid query cycles during MIR building, we can check the actual
300300 // 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) ) {
302302 constraints. outlives . extend ( args. upvar_tys ( ) . iter ( ) . map ( ty:: GenericArg :: from) ) ;
303303 constraints. outlives . push ( args. resume_ty ( ) . into ( ) ) ;
304304 }
You can’t perform that action at this time.
0 commit comments