diff options
| author | Michael Goulet <michael@errs.io> | 2025-07-02 00:29:51 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-07-02 00:33:06 +0000 |
| commit | ae0bef778ab184636f06266fab5fbdec306e2ca1 (patch) | |
| tree | a1985ea895b3247fdf0c8f54a9155581927c764b /compiler/rustc_traits | |
| parent | 71e4c005caa812a16fcb08d0bf1e6f1eda7c8381 (diff) | |
| download | rust-ae0bef778ab184636f06266fab5fbdec306e2ca1.tar.gz rust-ae0bef778ab184636f06266fab5fbdec306e2ca1.zip | |
Remove fast path from codegen_select, since Sized has no methods
Diffstat (limited to 'compiler/rustc_traits')
| -rw-r--r-- | compiler/rustc_traits/src/codegen.rs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/compiler/rustc_traits/src/codegen.rs b/compiler/rustc_traits/src/codegen.rs index 9d144010561..7dd3c59edd0 100644 --- a/compiler/rustc_traits/src/codegen.rs +++ b/compiler/rustc_traits/src/codegen.rs @@ -6,11 +6,11 @@ use rustc_infer::infer::TyCtxtInferExt; use rustc_middle::bug; use rustc_middle::traits::CodegenObligationError; -use rustc_middle::ty::{self, PseudoCanonicalInput, TyCtxt, TypeVisitableExt, Upcast}; +use rustc_middle::ty::{self, PseudoCanonicalInput, TyCtxt, TypeVisitableExt}; use rustc_trait_selection::error_reporting::InferCtxtErrorExt; use rustc_trait_selection::traits::{ ImplSource, Obligation, ObligationCause, ObligationCtxt, ScrubbedTraitError, SelectionContext, - SelectionError, sizedness_fast_path, + SelectionError, }; use tracing::debug; @@ -34,13 +34,6 @@ pub(crate) fn codegen_select_candidate<'tcx>( let (infcx, param_env) = tcx.infer_ctxt().ignoring_regions().build_with_typing_env(typing_env); let mut selcx = SelectionContext::new(&infcx); - if sizedness_fast_path(tcx, trait_ref.upcast(tcx)) { - return Ok(&*tcx.arena.alloc(ImplSource::Builtin( - ty::solve::BuiltinImplSource::Trivial, - Default::default(), - ))); - } - let obligation_cause = ObligationCause::dummy(); let obligation = Obligation::new(tcx, obligation_cause, param_env, trait_ref); |
