Skip to content

Commit 4fcafc9

Browse files
committed
yeet fastpath
1 parent 4056082 commit 4fcafc9

File tree

1 file changed

+1
-13
lines changed
  • compiler/rustc_trait_selection/src

1 file changed

+1
-13
lines changed

compiler/rustc_trait_selection/src/infer.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_middle::infer::canonical::{
99
Canonical, CanonicalQueryInput, CanonicalQueryResponse, QueryResponse,
1010
};
1111
use rustc_middle::traits::query::NoSolution;
12-
use rustc_middle::ty::{self, GenericArg, Ty, TyCtxt, TypeFoldable, TypeVisitableExt, Upcast};
12+
use rustc_middle::ty::{self, GenericArg, Ty, TyCtxt, TypeFoldable, Upcast};
1313
use rustc_span::DUMMY_SP;
1414
use tracing::instrument;
1515

@@ -31,19 +31,7 @@ impl<'tcx> InferCtxt<'tcx> {
3131

3232
fn type_is_copy_modulo_regions(&self, param_env: ty::ParamEnv<'tcx>, ty: Ty<'tcx>) -> bool {
3333
let ty = self.resolve_vars_if_possible(ty);
34-
35-
// FIXME(#132279): This should be removed as it causes us to incorrectly
36-
// handle opaques in their defining scope, and stalled coroutines.
37-
if !self.next_trait_solver() && !(param_env, ty).has_infer() && !ty.has_coroutines() {
38-
return self.tcx.type_is_copy_modulo_regions(self.typing_env(param_env), ty);
39-
}
40-
4134
let copy_def_id = self.tcx.require_lang_item(LangItem::Copy, DUMMY_SP);
42-
43-
// This can get called from typeck (by euv), and `moves_by_default`
44-
// rightly refuses to work with inference variables, but
45-
// moves_by_default has a cache, which we want to use in other
46-
// cases.
4735
traits::type_known_to_meet_bound_modulo_regions(self, param_env, ty, copy_def_id)
4836
}
4937

0 commit comments

Comments
 (0)