about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-07-27 17:40:45 +0200
committerGitHub <noreply@github.com>2019-07-27 17:40:45 +0200
commit4b8031cf2cb6e7ebd738a68ecd79501dee791da7 (patch)
tree79f1676edc419040604e8eda2653096dc1585b7c /src/test/incremental/thinlto
parent0e9b465d729d07101b29b4d096d83edf9be82df0 (diff)
parent2f4196205336df8550a4bfb3045d3d1c350f02bf (diff)
downloadrust-4b8031cf2cb6e7ebd738a68ecd79501dee791da7.tar.gz
rust-4b8031cf2cb6e7ebd738a68ecd79501dee791da7.zip
Rollup merge of #62423 - Aaron1011:fix/existential-cycle, r=oli-obk
Fix cycle error with existential types

Fixes #61863

We now allow uses of `existential type`'s that aren't defining uses - that is, uses which don't constrain the underlying concrete type.

To make this work correctly, we also modify `eq_opaque_type_and_type` to not try to apply additional constraints to an opaque type. If we have code like this:

```rust
existential type Foo;
fn foo1() -> Foo { ... }
fn foo2() -> Foo { foo1() }
```

then `foo2` doesn't end up constraining `Foo`, which means that `foo2` will end up using the type `Foo` internally - that is, an actual `TyKind::Opaque`. We don't want to equate this to the underlying concrete type - we just need to enforce the basic equality constraint between the two types (here, the return type of `foo1` and the return type of `foo2`)
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions