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
|
@ -2200,7 +2200,8 @@ fn confirm_impl_trait_in_trait_candidate<'tcx>(
|
|||
Err(guar) => return Progress::error(tcx, guar),
|
||||
};
|
||||
// We don't support specialization for RPITITs anyways... yet.
|
||||
if !leaf_def.is_final() {
|
||||
// Also don't try to project to an RPITIT that has no value
|
||||
if !leaf_def.is_final() || !leaf_def.item.defaultness(tcx).has_value() {
|
||||
return Progress { term: tcx.ty_error_misc().into(), obligations };
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue