diff options
| author | lcnr <rust@lcnr.de> | 2025-09-23 08:25:07 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2025-09-23 17:02:55 +0200 |
| commit | 4fcafc9daad24e5811546896b80e4e18578bf9f3 (patch) | |
| tree | 55d3dbc29518a7602ef1427f6e3677b4620c32b9 | |
| parent | 40560823602064f4c726aea3e15e104449e1a392 (diff) | |
| download | rust-4fcafc9daad24e5811546896b80e4e18578bf9f3.tar.gz rust-4fcafc9daad24e5811546896b80e4e18578bf9f3.zip | |
yeet fastpath
| -rw-r--r-- | compiler/rustc_trait_selection/src/infer.rs | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/compiler/rustc_trait_selection/src/infer.rs b/compiler/rustc_trait_selection/src/infer.rs index 4c50c44b841..cd076d1cb69 100644 --- a/compiler/rustc_trait_selection/src/infer.rs +++ b/compiler/rustc_trait_selection/src/infer.rs @@ -9,7 +9,7 @@ use rustc_middle::infer::canonical::{ Canonical, CanonicalQueryInput, CanonicalQueryResponse, QueryResponse, }; use rustc_middle::traits::query::NoSolution; -use rustc_middle::ty::{self, GenericArg, Ty, TyCtxt, TypeFoldable, TypeVisitableExt, Upcast}; +use rustc_middle::ty::{self, GenericArg, Ty, TyCtxt, TypeFoldable, Upcast}; use rustc_span::DUMMY_SP; use tracing::instrument; @@ -31,19 +31,7 @@ impl<'tcx> InferCtxt<'tcx> { fn type_is_copy_modulo_regions(&self, param_env: ty::ParamEnv<'tcx>, ty: Ty<'tcx>) -> bool { let ty = self.resolve_vars_if_possible(ty); - - // FIXME(#132279): This should be removed as it causes us to incorrectly - // handle opaques in their defining scope, and stalled coroutines. - if !self.next_trait_solver() && !(param_env, ty).has_infer() && !ty.has_coroutines() { - return self.tcx.type_is_copy_modulo_regions(self.typing_env(param_env), ty); - } - let copy_def_id = self.tcx.require_lang_item(LangItem::Copy, DUMMY_SP); - - // This can get called from typeck (by euv), and `moves_by_default` - // rightly refuses to work with inference variables, but - // moves_by_default has a cache, which we want to use in other - // cases. traits::type_known_to_meet_bound_modulo_regions(self, param_env, ty, copy_def_id) } |
