about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAaron Hill <aa1ronham@gmail.com>2019-07-05 16:24:58 -0400
committerAaron Hill <aa1ronham@gmail.com>2019-07-07 17:22:06 -0400
commit8ba9b1019c6e6c514826c5466e84d93f665f975f (patch)
treef336346fc600e789a45be997a771e1b1cc81dea1 /src/rustllvm/RustWrapper.cpp
parentdd2e8040a35883574ae0c4cc7a4e887ecb66469c (diff)
downloadrust-8ba9b1019c6e6c514826c5466e84d93f665f975f.tar.gz
rust-8ba9b1019c6e6c514826c5466e84d93f665f975f.zip
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:

```
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/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions