diff options
| author | Aaron Hill <aa1ronham@gmail.com> | 2020-02-09 18:38:21 -0500 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2020-02-09 18:45:12 -0500 |
| commit | a60669d95cdad0e28cf28790b717bbcf235153f8 (patch) | |
| tree | c7fea4103952ea5385912f4ce5d7884f2d998e97 /src/libstd/sys | |
| parent | 71c7e149e42cb0fc78a80db70d2525973311d488 (diff) | |
| download | rust-a60669d95cdad0e28cf28790b717bbcf235153f8.tar.gz rust-a60669d95cdad0e28cf28790b717bbcf235153f8.zip | |
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')
0 files changed, 0 insertions, 0 deletions
