Rollup merge of #108746 - compiler-errors:rpitit-dont-project-default-w-no-valu, r=cjgillot
Don't project to RPITIT that has no default value
Replicates this behavior, but for RPITIT projection logic (which currently is separate)
b1719530f4/compiler/rustc_trait_selection/src/traits/project.rs (L2105-L2115)
Fixes #108738
This commit is contained in:
commit
b8762321a2
4 changed files with 41 additions and 3 deletions
|
@ -2199,7 +2199,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