Don't project to RPITIT that has no default value
This commit is contained in:
parent
276b75a843
commit
7634c5916a
4 changed files with 41 additions and 3 deletions
|
@ -344,8 +344,8 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::EarlyBinder<Ty<'_>>
|
|||
in_trait,
|
||||
..
|
||||
}) => {
|
||||
if in_trait {
|
||||
assert!(tcx.impl_defaultness(owner).has_value());
|
||||
if in_trait && !tcx.impl_defaultness(owner).has_value() {
|
||||
span_bug!(tcx.def_span(def_id), "tried to get type of this RPITIT with no definition");
|
||||
}
|
||||
find_opaque_ty_constraints_for_rpit(tcx, def_id, owner)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue