about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits/codegen.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-08-02 07:30:39 +0200
committerGitHub <noreply@github.com>2022-08-02 07:30:39 +0200
commit06294453001ec64d4d3b9085fc0b7129923ee5df (patch)
treea4fd1aca1abbe27181bb2270a423c3e8601f3807 /compiler/rustc_trait_selection/src/traits/codegen.rs
parent9d5cd21a5d4d5325b1f1c9903d000d19e3703e2a (diff)
parentbf183101dd2f5bfbc205207c254f53f8cc6e521c (diff)
downloadrust-06294453001ec64d4d3b9085fc0b7129923ee5df.tar.gz
rust-06294453001ec64d4d3b9085fc0b7129923ee5df.zip
Rollup merge of #99156 - lcnr:omoe-wa, r=wesleywiser
`codegen_fulfill_obligation` expect erased regions

it's a query, so by erasing regions before calling it, we get better caching.
This doesn't actually change anything as its already the status quo.
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/codegen.rs')
-rw-r--r--compiler/rustc_trait_selection/src/traits/codegen.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/codegen.rs b/compiler/rustc_trait_selection/src/traits/codegen.rs
index 5fcaa52d417..4b575ea660a 100644
--- a/compiler/rustc_trait_selection/src/traits/codegen.rs
+++ b/compiler/rustc_trait_selection/src/traits/codegen.rs
@@ -23,8 +23,6 @@ pub fn codegen_fulfill_obligation<'tcx>(
     tcx: TyCtxt<'tcx>,
     (param_env, trait_ref): (ty::ParamEnv<'tcx>, ty::PolyTraitRef<'tcx>),
 ) -> Result<&'tcx ImplSource<'tcx, ()>, CodegenObligationError> {
-    // Remove any references to regions; this helps improve caching.
-    let trait_ref = tcx.erase_regions(trait_ref);
     // We expect the input to be fully normalized.
     debug_assert_eq!(trait_ref, tcx.normalize_erasing_regions(param_env, trait_ref));