Skip to content

Commit 9c2b71a

Browse files
committed
TyCtxtEnsure::const_eval_poly: Try to erase regions twice
Probably won't make a difference because erase_regions no-ops on region-erased things anyway.
1 parent 83a14a0 commit 9c2b71a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_middle/src/mir/interpret/queries.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ impl<'tcx> TyCtxtEnsure<'tcx> {
209209
// into `const_eval` which will return `ErrorHandled::TooGeneric` if any of them are
210210
// encountered.
211211
let args = GenericArgs::identity_for_item(self.tcx, def_id);
212-
let instance = ty::Instance::new(def_id, self.tcx.erase_regions(args));
212+
let instance = ty::Instance::new(def_id, args);
213213
let cid = GlobalId { instance, promoted: None };
214214
let typing_env = ty::TypingEnv::post_analysis(self.tcx, def_id);
215215
// Const-eval shouldn't depend on lifetimes at all, so we can erase them, which should

0 commit comments

Comments
 (0)