diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-07-27 17:40:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-27 17:40:45 +0200 |
| commit | 4b8031cf2cb6e7ebd738a68ecd79501dee791da7 (patch) | |
| tree | 79f1676edc419040604e8eda2653096dc1585b7c /src/test/debuginfo/enum-thinlto.rs | |
| parent | 0e9b465d729d07101b29b4d096d83edf9be82df0 (diff) | |
| parent | 2f4196205336df8550a4bfb3045d3d1c350f02bf (diff) | |
| download | rust-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/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions
