Skip to content

Commit ae0bef7

Browse files
Remove fast path from codegen_select, since Sized has no methods
1 parent 71e4c00 commit ae0bef7

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

compiler/rustc_traits/src/codegen.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
use rustc_infer::infer::TyCtxtInferExt;
77
use rustc_middle::bug;
88
use rustc_middle::traits::CodegenObligationError;
9-
use rustc_middle::ty::{self, PseudoCanonicalInput, TyCtxt, TypeVisitableExt, Upcast};
9+
use rustc_middle::ty::{self, PseudoCanonicalInput, TyCtxt, TypeVisitableExt};
1010
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
1111
use rustc_trait_selection::traits::{
1212
ImplSource, Obligation, ObligationCause, ObligationCtxt, ScrubbedTraitError, SelectionContext,
13-
SelectionError, sizedness_fast_path,
13+
SelectionError,
1414
};
1515
use tracing::debug;
1616

@@ -34,13 +34,6 @@ pub(crate) fn codegen_select_candidate<'tcx>(
3434
let (infcx, param_env) = tcx.infer_ctxt().ignoring_regions().build_with_typing_env(typing_env);
3535
let mut selcx = SelectionContext::new(&infcx);
3636

37-
if sizedness_fast_path(tcx, trait_ref.upcast(tcx)) {
38-
return Ok(&*tcx.arena.alloc(ImplSource::Builtin(
39-
ty::solve::BuiltinImplSource::Trivial,
40-
Default::default(),
41-
)));
42-
}
43-
4437
let obligation_cause = ObligationCause::dummy();
4538
let obligation = Obligation::new(tcx, obligation_cause, param_env, trait_ref);
4639

0 commit comments

Comments
 (0)