about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2022-06-22 21:47:01 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2022-06-22 21:47:01 +0200
commit9388824b9ec480e0995fa1cec43b852026deb72e (patch)
treebf48e4515812a2170cc893115addc5a8897121ac /compiler
parent95b83f9cac0a91aa3a215656accc8721de18db94 (diff)
downloadrust-9388824b9ec480e0995fa1cec43b852026deb72e.tar.gz
rust-9388824b9ec480e0995fa1cec43b852026deb72e.zip
Contaminate ErrorGuaranteed.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_typeck/src/coherence/orphan.rs4
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);