change error_reported to use Result instead of an option
This commit is contained in:
parent
7df9d818ab
commit
ab22f5521b
7 changed files with 15 additions and 22 deletions
|
@ -23,9 +23,7 @@ pub(crate) fn orphan_check_impl(
|
|||
impl_def_id: LocalDefId,
|
||||
) -> Result<(), ErrorGuaranteed> {
|
||||
let trait_ref = tcx.impl_trait_ref(impl_def_id).unwrap();
|
||||
if let Some(err) = trait_ref.error_reported() {
|
||||
return Err(err);
|
||||
}
|
||||
trait_ref.error_reported()?;
|
||||
|
||||
let ret = do_orphan_check_impl(tcx, trait_ref, impl_def_id);
|
||||
if tcx.trait_is_auto(trait_ref.def_id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue