diff options
| author | Michael Goulet <michael@errs.io> | 2023-07-20 18:36:34 +0000 | 
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-07-25 15:15:25 +0000 | 
| commit | de81007d1310580e6060f2356f1938e45cafb92c (patch) | |
| tree | bd45f9fbceb054827520e7ebbc22aecdea534c09 /compiler/rustc_trait_selection/src/solve/project_goals.rs | |
| parent | c02d1a65534244532aba0f42a6719d87084865d2 (diff) | |
| download | rust-de81007d1310580e6060f2356f1938e45cafb92c.tar.gz rust-de81007d1310580e6060f2356f1938e45cafb92c.zip | |
Consolidate trait upcasting and unsize into one normalization
Diffstat (limited to 'compiler/rustc_trait_selection/src/solve/project_goals.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/project_goals.rs | 13 | 
1 files changed, 3 insertions, 10 deletions
| diff --git a/compiler/rustc_trait_selection/src/solve/project_goals.rs b/compiler/rustc_trait_selection/src/solve/project_goals.rs index 222ed9939ba..0f4fec50427 100644 --- a/compiler/rustc_trait_selection/src/solve/project_goals.rs +++ b/compiler/rustc_trait_selection/src/solve/project_goals.rs @@ -1,6 +1,6 @@ use crate::traits::specialization_graph; -use super::assembly::{self, structural_traits}; +use super::assembly::{self, structural_traits, BuiltinImplSource}; use super::EvalCtxt; use rustc_hir::def::DefKind; use rustc_hir::def_id::DefId; @@ -502,17 +502,10 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> { ) } - fn consider_builtin_unsize_candidate( + fn consider_builtin_unsize_and_upcast_candidates( _ecx: &mut EvalCtxt<'_, 'tcx>, goal: Goal<'tcx, Self>, - ) -> QueryResult<'tcx> { - bug!("`Unsize` does not have an associated type: {:?}", goal); - } - - fn consider_builtin_dyn_upcast_candidates( - _ecx: &mut EvalCtxt<'_, 'tcx>, - goal: Goal<'tcx, Self>, - ) -> Vec<CanonicalResponse<'tcx>> { + ) -> Vec<(CanonicalResponse<'tcx>, BuiltinImplSource)> { bug!("`Unsize` does not have an associated type: {:?}", goal); } | 
