Skip to content

Commit

Permalink
Auto merge of #114586 - oli-obk:patch_tait_rpit_order_check, r=lcnr,c…
Browse files Browse the repository at this point in the history
…ompiler-errors

Bubble up opaque <eq> opaque operations instead of picking an order

In case we are in `Bubble` mode (meaning every opaque type that is defined in the current crate is treated as if it were in its defining scope), we don't try to register an opaque type as the hidden type of another opaque type, but instead bubble up an obligation to equate them at the query caller site. Usually that means we have a `DefiningAnchor::Bind` and thus can reliably figure out whether an opaque type is in its defining scope. Where we can't, we'll error out, so the default is sound.

With this change we start using `AliasTyEq` predicates in the old solver, too.

fixes rust-lang/rust#108498

But also regresses `tests/ui/impl-trait/anon_scope_creep.rs`. Our use of `Bubble` for `check_opaque_type_well_formed` is going to keep biting us.

r? `@lcnr` `@compiler-errors`
  • Loading branch information
bors committed Sep 11, 2023
2 parents 65c8336 + 5313c6d commit e1fa782
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit e1fa782

Please sign in to comment.