Skip to content

Commit

Permalink
TyCtxtEnsure::const_eval_poly: Don't try to erase regions twice
Browse files Browse the repository at this point in the history
Probably won't make a difference because erase_regions no-ops on region-erased things anyway.
  • Loading branch information
fmease committed Feb 3, 2025
1 parent f0e361f commit 9f2fdff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/mir/interpret/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ impl<'tcx> TyCtxtEnsureOk<'tcx> {
// into `const_eval` which will return `ErrorHandled::TooGeneric` if any of them are
// encountered.
let args = GenericArgs::identity_for_item(self.tcx, def_id);
let instance = ty::Instance::new(def_id, self.tcx.erase_regions(args));
let instance = ty::Instance::new(def_id, args);
let cid = GlobalId { instance, promoted: None };
let typing_env = ty::TypingEnv::post_analysis(self.tcx, def_id);
// Const-eval shouldn't depend on lifetimes at all, so we can erase them, which should
Expand Down

0 comments on commit 9f2fdff

Please sign in to comment.