Fold vtable_trait_upcasting_coercion_new_vptr_slot logic into obligation processing.
This commit is contained in:
@@ -1483,7 +1483,9 @@ fn assemble_candidates_from_impls<'cx, 'tcx>(
|
||||
// why we special case object types.
|
||||
false
|
||||
}
|
||||
super::ImplSource::AutoImpl(..) | super::ImplSource::Builtin(..) => {
|
||||
super::ImplSource::AutoImpl(..)
|
||||
| super::ImplSource::Builtin(..)
|
||||
| super::ImplSource::TraitUpcasting(_) => {
|
||||
// These traits have no associated types.
|
||||
selcx.tcx().sess.delay_span_bug(
|
||||
obligation.cause.span,
|
||||
@@ -1554,6 +1556,7 @@ fn confirm_select_candidate<'cx, 'tcx>(
|
||||
| super::ImplSource::AutoImpl(..)
|
||||
| super::ImplSource::Param(..)
|
||||
| super::ImplSource::Builtin(..)
|
||||
| super::ImplSource::TraitUpcasting(_)
|
||||
| super::ImplSource::TraitAlias(..) => {
|
||||
// we don't create Select candidates with this kind of resolution
|
||||
span_bug!(
|
||||
|
||||
Reference in New Issue
Block a user