1
Fork 0

register opaques that reference errors

This commit is contained in:
Ali MJ Al-Nasrawy 2024-03-20 17:24:07 +00:00
parent 19e0ea4a6d
commit 0dc006b3a8
7 changed files with 44 additions and 29 deletions

View file

@ -94,9 +94,6 @@ impl<'tcx> InferCtxt<'tcx> {
cause: &ObligationCause<'tcx>,
param_env: ty::ParamEnv<'tcx>,
) -> InferResult<'tcx, ()> {
if a.references_error() || b.references_error() {
return Ok(InferOk { value: (), obligations: vec![] });
}
let process = |a: Ty<'tcx>, b: Ty<'tcx>| match *a.kind() {
ty::Alias(ty::Opaque, ty::AliasTy { def_id, args, .. }) if def_id.is_local() => {
let def_id = def_id.expect_local();