1
Fork 0

Rollup merge of #100514 - compiler-errors:issue-100191, r=spastorino

Delay span bug when failing to normalize negative coherence impl subject due to other malformed impls

Fixes #100191

r? ``@spastorino``
This commit is contained in:
Matthias Krüger 2022-08-15 20:11:36 +02:00 committed by GitHub
commit a1fdea2b78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 66 additions and 1 deletions

View file

@ -307,7 +307,13 @@ fn negative_impl<'cx, 'tcx>(
tcx.impl_subject(impl1_def_id),
) {
Ok(s) => s,
Err(err) => bug!("failed to fully normalize {:?}: {:?}", impl1_def_id, err),
Err(err) => {
tcx.sess.delay_span_bug(
tcx.def_span(impl1_def_id),
format!("failed to fully normalize {:?}: {:?}", impl1_def_id, err),
);
return false;
}
};
// Attempt to prove that impl2 applies, given all of the above.