Rollup merge of #122915 - fmease:lt-opaq-mismatch-delay-bug, r=compiler-errors
Delay a bug if no RPITITs were found Fixes #122655. See the issue for context. r? compiler-errors or compiler
This commit is contained in:
commit
f03326c579
3 changed files with 74 additions and 21 deletions
|
@ -639,10 +639,9 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
|
|||
}
|
||||
}
|
||||
|
||||
if !unnormalized_trait_sig.output().references_error() {
|
||||
debug_assert!(
|
||||
!collector.types.is_empty(),
|
||||
"expect >0 RPITITs in call to `collect_return_position_impl_trait_in_trait_tys`"
|
||||
if !unnormalized_trait_sig.output().references_error() && collector.types.is_empty() {
|
||||
tcx.dcx().delayed_bug(
|
||||
"expect >0 RPITITs in call to `collect_return_position_impl_trait_in_trait_tys`",
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue