diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-06-22 21:47:01 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-06-22 21:47:01 +0200 |
| commit | 9388824b9ec480e0995fa1cec43b852026deb72e (patch) | |
| tree | bf48e4515812a2170cc893115addc5a8897121ac /compiler | |
| parent | 95b83f9cac0a91aa3a215656accc8721de18db94 (diff) | |
| download | rust-9388824b9ec480e0995fa1cec43b852026deb72e.tar.gz rust-9388824b9ec480e0995fa1cec43b852026deb72e.zip | |
Contaminate ErrorGuaranteed.
Diffstat (limited to 'compiler')
| -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); |
