Skip to content

Commit 9388824

Browse files
committed
Contaminate ErrorGuaranteed.
1 parent 95b83f9 commit 9388824

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_typeck/src/coherence/orphan.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ pub(crate) fn orphan_check_impl(
2424
impl_def_id: LocalDefId,
2525
) -> Result<(), ErrorGuaranteed> {
2626
let trait_ref = tcx.impl_trait_ref(impl_def_id).unwrap();
27-
if trait_ref.references_error() {
28-
return Ok(());
27+
if let Some(err) = trait_ref.error_reported() {
28+
return Err(err);
2929
}
3030

3131
let ret = do_orphan_check_impl(tcx, trait_ref, impl_def_id);

0 commit comments

Comments
 (0)