Skip to content

Commit 9f2fdff

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

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> TyCtxtEnsureOk<'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)