diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-02-13 02:52:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-13 02:52:49 +0100 |
| commit | e9f391e09a43680cfe24077ba750997eb3893ade (patch) | |
| tree | 54b842d7610d1cd6fd92763c640de4f2f76bce6a /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 87ba8f2a19ef97790571a8b092b95fe87b6b6f76 (diff) | |
| parent | 34cf0b32674da79403746716e5a7ed2072dfabe2 (diff) | |
| download | rust-e9f391e09a43680cfe24077ba750997eb3893ade.tar.gz rust-e9f391e09a43680cfe24077ba750997eb3893ade.zip | |
Rollup merge of #69008 - Aaron1011:fix/opaque-ty-parent, r=matthewjasper
Properly use parent generics for opaque types
Fixes #67844
Previously, opaque types would only get parent generics if they
a return-position-impl-trait (e.g. `fn foo<A>() -> impl MyTrait<A>`).
However, it's possible for opaque types to be nested inside one another:
```rust
trait WithAssoc { type AssocType; }
trait WithParam<A> {}
type Return<A> = impl WithAssoc<AssocType = impl WithParam<A>>;
```
When this occurs, we need to ensure that the nested opaque types
properly inherit generic parameters from their parent opaque type.
This commit fixes the `generics_of` query to take the parent item
into account when determining the generics for an opaque type.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
