diff options
| -rw-r--r-- | compiler/rustc_typeck/src/coherence/orphan.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_typeck/src/coherence/orphan.rs b/compiler/rustc_typeck/src/coherence/orphan.rs index 8a3d0568f42..f3a043a08a3 100644 --- a/compiler/rustc_typeck/src/coherence/orphan.rs +++ b/compiler/rustc_typeck/src/coherence/orphan.rs @@ -24,8 +24,8 @@ pub(crate) fn orphan_check_impl( impl_def_id: LocalDefId, ) -> Result<(), ErrorGuaranteed> { let trait_ref = tcx.impl_trait_ref(impl_def_id).unwrap(); - if trait_ref.references_error() { - return Ok(()); + if let Some(err) = trait_ref.error_reported() { + return Err(err); } let ret = do_orphan_check_impl(tcx, trait_ref, impl_def_id); |
