Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly use parent generics for opaque types #69008

Merged
merged 2 commits into from
Feb 13, 2020

Conversation

Aaron1011
Copy link
Member

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:

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.

Fixes rust-lang#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.
@rust-highfive
Copy link
Collaborator

r? @ecstatic-morse

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 9, 2020
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-02-09T23:49:06.4732820Z ========================== Starting Command Output ===========================
2020-02-09T23:49:06.4735469Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/27782079-9eca-4014-a074-5a0218370543.sh
2020-02-09T23:49:06.4735663Z 
2020-02-09T23:49:06.4739264Z ##[section]Finishing: Disable git automatic line ending conversion
2020-02-09T23:49:06.4744787Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69008/merge to s
2020-02-09T23:49:06.4746179Z Task         : Get sources
2020-02-09T23:49:06.4746207Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-09T23:49:06.4746234Z Version      : 1.0.0
2020-02-09T23:49:06.4746271Z Author       : Microsoft
---
2020-02-09T23:49:07.3693124Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-02-09T23:49:07.3801212Z ##[command]git config gc.auto 0
2020-02-09T23:49:07.3885365Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-02-09T23:49:07.3947636Z ##[command]git config --get-all http.proxy
2020-02-09T23:49:07.4112454Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/69008/merge:refs/remotes/pull/69008/merge
---
2020-02-10T00:44:13.9839723Z .................................................................................................... 1700/9622
2020-02-10T00:44:18.6432411Z .................................................................................................... 1800/9622
2020-02-10T00:44:30.1578796Z ............................i....................................................................... 1900/9622
2020-02-10T00:44:36.6499611Z .................................................................................................... 2000/9622
2020-02-10T00:44:49.6924062Z ..................iiiii............................................................................. 2100/9622
2020-02-10T00:44:58.6300249Z .................................................................................................... 2300/9622
2020-02-10T00:45:00.9632910Z .................................................................................................... 2400/9622
2020-02-10T00:45:05.6954445Z .................................................................................................... 2500/9622
2020-02-10T00:45:25.1307720Z .................................................................................................... 2600/9622
---
2020-02-10T00:47:55.2910400Z .....................................................................i...............i.............. 4900/9622
2020-02-10T00:48:03.0119854Z .................................................................................................... 5000/9622
2020-02-10T00:48:10.8433096Z .................................................................................................... 5100/9622
2020-02-10T00:48:15.6325823Z ...........i........................................................................................ 5200/9622
2020-02-10T00:48:26.3436093Z .....................................................................................ii.ii........i. 5300/9622
2020-02-10T00:48:30.0207279Z ..i................................................................................................. 5400/9622
2020-02-10T00:48:41.2424683Z .................................................................................................... 5600/9622
2020-02-10T00:48:49.3334145Z .........................................................................i.......................... 5700/9622
2020-02-10T00:48:56.1268574Z .................................................................................................... 5800/9622
2020-02-10T00:49:02.1335641Z .................................................................................................... 5900/9622
2020-02-10T00:49:02.1335641Z .................................................................................................... 5900/9622
2020-02-10T00:49:11.7242253Z .................................................................ii...i..ii...........i............. 6000/9622
2020-02-10T00:49:31.6669889Z .................................................................................................... 6200/9622
2020-02-10T00:49:38.8349738Z .................................................................................................... 6300/9622
2020-02-10T00:49:38.8349738Z .................................................................................................... 6300/9622
2020-02-10T00:49:46.3098870Z .............................................................................................i..ii.. 6400/9622
2020-02-10T00:50:09.4006811Z .................................................................................................... 6600/9622
2020-02-10T00:50:18.5334529Z ................................................................................i................... 6700/9622
2020-02-10T00:50:20.5411855Z .................................................................................................... 6800/9622
2020-02-10T00:50:22.6287283Z .......................................................................................i............ 6900/9622
---
2020-02-10T00:51:53.1952645Z .................................................................................................... 7600/9622
2020-02-10T00:51:56.9763571Z .................................................................................................... 7700/9622
2020-02-10T00:52:01.8898255Z .................................................................................................... 7800/9622
2020-02-10T00:52:09.7477141Z .................................................................................................... 7900/9622
2020-02-10T00:52:18.3905194Z ...............................................................iiiiiii.i............................ 8000/9622
2020-02-10T00:52:32.0637087Z ...i......i......................................................................................... 8200/9622
2020-02-10T00:52:37.1437636Z .................................................................................................... 8300/9622
2020-02-10T00:52:49.9254001Z .................................................................................................... 8400/9622
2020-02-10T00:52:57.7148387Z .................................................................................................... 8500/9622
---
2020-02-10T00:54:46.8485041Z - error: aborting due to 4 previous errors
2020-02-10T00:54:46.8485193Z + error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied
2020-02-10T00:54:46.8485519Z +   --> $DIR/bindings.rs:5:16
2020-02-10T00:54:46.8485661Z +    |
2020-02-10T00:54:46.8485791Z + LL | fn a<T: Clone>(x: T) {
2020-02-10T00:54:46.8486110Z +    |      -- help: consider further restricting this bound: `T: std::clone::Clone +`
2020-02-10T00:54:46.8486259Z + LL |     const foo: impl Clone = x;
2020-02-10T00:54:46.8486513Z +    |
2020-02-10T00:54:46.8486638Z +    = note: the return type of a function must have a statically known size
2020-02-10T00:54:46.8486774Z 34 
2020-02-10T00:54:46.8487077Z - For more information about this error, try `rustc --explain E0435`.
2020-02-10T00:54:46.8487077Z - For more information about this error, try `rustc --explain E0435`.
2020-02-10T00:54:46.8487226Z + error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied
2020-02-10T00:54:46.8487520Z +   --> $DIR/bindings.rs:11:20
2020-02-10T00:54:46.8487662Z +    |
2020-02-10T00:54:46.8487793Z + LL | fn b<T: Clone>(x: T) {
2020-02-10T00:54:46.8488126Z +    |      -- help: consider further restricting this bound: `T: std::clone::Clone +`
2020-02-10T00:54:46.8488286Z + LL |     let _ = move || {
2020-02-10T00:54:46.8488595Z + LL |         const foo: impl Clone = x;
2020-02-10T00:54:46.8488836Z +    |
2020-02-10T00:54:46.8488983Z +    = note: the return type of a function must have a statically known size
2020-02-10T00:54:46.8489275Z + 
2020-02-10T00:54:46.8489402Z + error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied
2020-02-10T00:54:46.8489402Z + error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied
2020-02-10T00:54:46.8489963Z +   --> $DIR/bindings.rs:18:20
2020-02-10T00:54:46.8490111Z +    |
2020-02-10T00:54:46.8490231Z + LL | trait Foo<T: Clone> {
2020-02-10T00:54:46.8490843Z +    |           -- help: consider further restricting this bound: `T: std::clone::Clone +`
2020-02-10T00:54:46.8491015Z + LL |     fn a(x: T) {
2020-02-10T00:54:46.8491159Z + LL |         const foo: impl Clone = x;
2020-02-10T00:54:46.8491424Z +    |
2020-02-10T00:54:46.8491563Z +    = note: the return type of a function must have a statically known size
2020-02-10T00:54:46.8491685Z + 
2020-02-10T00:54:46.8491805Z + error[E0277]: the trait bound `Self: Foo<T>` is not satisfied
2020-02-10T00:54:46.8491805Z + error[E0277]: the trait bound `Self: Foo<T>` is not satisfied
2020-02-10T00:54:46.8492122Z +   --> $DIR/bindings.rs:18:20
2020-02-10T00:54:46.8492270Z +    |
2020-02-10T00:54:46.8492549Z + LL |     fn a(x: T) {
2020-02-10T00:54:46.8493236Z +    |               - help: consider further restricting `Self`: `where Self: Foo<T>`
2020-02-10T00:54:46.8493433Z + LL |         const foo: impl Clone = x;
2020-02-10T00:54:46.8493575Z +    |                    ^^^^^^^^^^ the trait `Foo<T>` is not implemented for `Self`
2020-02-10T00:54:46.8493810Z +    = note: the return type of a function must have a statically known size
2020-02-10T00:54:46.8493941Z + 
2020-02-10T00:54:46.8494060Z + error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied
2020-02-10T00:54:46.8494499Z +   --> $DIR/bindings.rs:25:20
2020-02-10T00:54:46.8494499Z +   --> $DIR/bindings.rs:25:20
2020-02-10T00:54:46.8494661Z +    |
2020-02-10T00:54:46.8494777Z + LL | impl<T: Clone> Foo<T> for i32 {
2020-02-10T00:54:46.8495097Z +    |      -- help: consider further restricting this bound: `T: std::clone::Clone +`
2020-02-10T00:54:46.8495265Z + LL |     fn a(x: T) {
2020-02-10T00:54:46.8495379Z + LL |         const foo: impl Clone = x;
2020-02-10T00:54:46.8495648Z +    |
2020-02-10T00:54:46.8495764Z +    = note: the return type of a function must have a statically known size
2020-02-10T00:54:46.8495896Z + 
2020-02-10T00:54:46.8496008Z + error: aborting due to 9 previous errors
2020-02-10T00:54:46.8496008Z + error: aborting due to 9 previous errors
2020-02-10T00:54:46.8496117Z + 
2020-02-10T00:54:46.8496249Z + Some errors have detailed explanations: E0277, E0435.
2020-02-10T00:54:46.8496581Z + For more information about an error, try `rustc --explain E0277`.
2020-02-10T00:54:46.8496738Z 36 
2020-02-10T00:54:46.8496857Z 
2020-02-10T00:54:46.8496956Z 
2020-02-10T00:54:46.8497072Z The actual stderr differed from the expected stderr.
2020-02-10T00:54:46.8497419Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/bindings/bindings.stderr
2020-02-10T00:54:46.8497772Z To update references, rerun the tests and pass the `--bless` flag
2020-02-10T00:54:46.8498107Z To only update this specific test, also pass `--test-args impl-trait/bindings.rs`
2020-02-10T00:54:46.8498385Z error: 1 errors occurred comparing output.
2020-02-10T00:54:46.8498497Z status: exit code: 1
2020-02-10T00:54:46.8498497Z status: exit code: 1
2020-02-10T00:54:46.8499271Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/impl-trait/bindings.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/bindings" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/bindings/auxiliary" "-A" "unused"
2020-02-10T00:54:46.8499774Z ------------------------------------------
2020-02-10T00:54:46.8499905Z 
2020-02-10T00:54:46.8500194Z ------------------------------------------
2020-02-10T00:54:46.8500354Z stderr:
---
2020-02-10T00:54:46.8507638Z 
2020-02-10T00:54:46.8507756Z error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied
2020-02-10T00:54:46.8508074Z   --> /checkout/src/test/ui/impl-trait/bindings.rs:5:16
2020-02-10T00:54:46.8508215Z    |
2020-02-10T00:54:46.8508344Z LL | fn a<T: Clone>(x: T) {
2020-02-10T00:54:46.8508684Z    |      -- help: consider further restricting this bound: `T: std::clone::Clone +`
2020-02-10T00:54:46.8509540Z LL |     const foo: impl Clone = x;
2020-02-10T00:54:46.8509644Z    |
2020-02-10T00:54:46.8509682Z    = note: the return type of a function must have a statically known size
2020-02-10T00:54:46.8509829Z 
2020-02-10T00:54:46.8509870Z error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied
2020-02-10T00:54:46.8509870Z error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied
2020-02-10T00:54:46.8510149Z   --> /checkout/src/test/ui/impl-trait/bindings.rs:11:20
2020-02-10T00:54:46.8510189Z    |
2020-02-10T00:54:46.8510241Z LL | fn b<T: Clone>(x: T) {
2020-02-10T00:54:46.8510451Z    |      -- help: consider further restricting this bound: `T: std::clone::Clone +`
2020-02-10T00:54:46.8510492Z LL |     let _ = move || {
2020-02-10T00:54:46.8510545Z LL |         const foo: impl Clone = x;
2020-02-10T00:54:46.8510630Z    |
2020-02-10T00:54:46.8510685Z    = note: the return type of a function must have a statically known size
2020-02-10T00:54:46.8510710Z 
2020-02-10T00:54:46.8510747Z error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied
2020-02-10T00:54:46.8510747Z error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied
2020-02-10T00:54:46.8510939Z   --> /checkout/src/test/ui/impl-trait/bindings.rs:18:20
2020-02-10T00:54:46.8510992Z    |
2020-02-10T00:54:46.8511025Z LL | trait Foo<T: Clone> {
2020-02-10T00:54:46.8511361Z    |           -- help: consider further restricting this bound: `T: std::clone::Clone +`
2020-02-10T00:54:46.8511423Z LL |     fn a(x: T) {
2020-02-10T00:54:46.8511459Z LL |         const foo: impl Clone = x;
2020-02-10T00:54:46.8511554Z    |
2020-02-10T00:54:46.8511591Z    = note: the return type of a function must have a statically known size
2020-02-10T00:54:46.8511616Z 
2020-02-10T00:54:46.8511653Z error[E0277]: the trait bound `Self: Foo<T>` is not satisfied
2020-02-10T00:54:46.8511653Z error[E0277]: the trait bound `Self: Foo<T>` is not satisfied
2020-02-10T00:54:46.8511873Z   --> /checkout/src/test/ui/impl-trait/bindings.rs:18:20
2020-02-10T00:54:46.8511910Z    |
2020-02-10T00:54:46.8511942Z LL |     fn a(x: T) {
2020-02-10T00:54:46.8512165Z    |               - help: consider further restricting `Self`: `where Self: Foo<T>`
2020-02-10T00:54:46.8512207Z LL |         const foo: impl Clone = x;
2020-02-10T00:54:46.8512247Z    |                    ^^^^^^^^^^ the trait `Foo<T>` is not implemented for `Self`
2020-02-10T00:54:46.8512532Z    = note: the return type of a function must have a statically known size
2020-02-10T00:54:46.8512560Z 
2020-02-10T00:54:46.8512598Z error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied
2020-02-10T00:54:46.8512850Z   --> /checkout/src/test/ui/impl-trait/bindings.rs:25:20
2020-02-10T00:54:46.8512850Z   --> /checkout/src/test/ui/impl-trait/bindings.rs:25:20
2020-02-10T00:54:46.8512887Z    |
2020-02-10T00:54:46.8512922Z LL | impl<T: Clone> Foo<T> for i32 {
2020-02-10T00:54:46.8513146Z    |      -- help: consider further restricting this bound: `T: std::clone::Clone +`
2020-02-10T00:54:46.8513266Z LL |     fn a(x: T) {
2020-02-10T00:54:46.8513301Z LL |         const foo: impl Clone = x;
2020-02-10T00:54:46.8513398Z    |
2020-02-10T00:54:46.8513435Z    = note: the return type of a function must have a statically known size
2020-02-10T00:54:46.8513476Z 
2020-02-10T00:54:46.8513512Z error: aborting due to 9 previous errors
---
2020-02-10T00:54:46.8520309Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-02-10T00:54:46.8520390Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-02-10T00:54:46.8533936Z 
2020-02-10T00:54:46.8534363Z 
2020-02-10T00:54:46.8539235Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-7/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "7.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-02-10T00:54:46.8539441Z 
2020-02-10T00:54:46.8539468Z 
2020-02-10T00:54:46.8545593Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-02-10T00:54:46.8545711Z Build completed unsuccessfully in 0:59:34
2020-02-10T00:54:46.8545711Z Build completed unsuccessfully in 0:59:34
2020-02-10T00:54:46.8594707Z == clock drift check ==
2020-02-10T00:54:46.8615860Z   local time: Mon Feb 10 00:54:46 UTC 2020
2020-02-10T00:54:47.0237568Z   network time: Mon, 10 Feb 2020 00:54:47 GMT
2020-02-10T00:54:47.0237634Z == end clock drift check ==
2020-02-10T00:54:47.4182833Z 
2020-02-10T00:54:47.4293827Z ##[error]Bash exited with code '1'.
2020-02-10T00:54:47.4304476Z ##[section]Finishing: Run build
2020-02-10T00:54:47.4323430Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69008/merge to s
2020-02-10T00:54:47.4324983Z Task         : Get sources
2020-02-10T00:54:47.4325021Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-10T00:54:47.4325058Z Version      : 1.0.0
2020-02-10T00:54:47.4325107Z Author       : Microsoft
2020-02-10T00:54:47.4325107Z Author       : Microsoft
2020-02-10T00:54:47.4325143Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-02-10T00:54:47.4325320Z ==============================================================================
2020-02-10T00:54:47.8190247Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-02-10T00:54:47.8224534Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69008/merge to s
2020-02-10T00:54:47.8329352Z Cleaning up task key
2020-02-10T00:54:47.8329991Z Start cleaning up orphan processes.
2020-02-10T00:54:47.8432234Z Terminate orphan process: pid (3592) (python)
2020-02-10T00:54:47.8694745Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@Centril Centril added the F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` label Feb 10, 2020
@Centril
Copy link
Contributor

Centril commented Feb 10, 2020

cc @varkor @nikomatsakis

@Aaron1011
Copy link
Member Author

The new error message isn't great, but I think it's correct that there's an additional error. const items can't reference generic parameters from the function, which is what this example is trying to do (by making the defining type T).

@Aaron1011
Copy link
Member Author

Actually, it would probably make sense to try to suppress any opaque-type related errors if we already emitted an error related to the 'defining type' part of it.

@ecstatic-morse
Copy link
Contributor

r? @matthewjasper

@rust-highfive
Copy link
Collaborator

Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-02-11T04:36:30.4245512Z ========================== Starting Command Output ===========================
2020-02-11T04:36:30.4249548Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/89cadf7c-3664-4f55-ac5b-1ac7273cb69f.sh
2020-02-11T04:36:30.4249725Z 
2020-02-11T04:36:30.4256584Z ##[section]Finishing: Disable git automatic line ending conversion
2020-02-11T04:36:30.4262849Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69008/merge to s
2020-02-11T04:36:30.4265258Z Task         : Get sources
2020-02-11T04:36:30.4265293Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-11T04:36:30.4265325Z Version      : 1.0.0
2020-02-11T04:36:30.4265358Z Author       : Microsoft
---
2020-02-11T04:36:31.5210578Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-02-11T04:36:31.5293843Z ##[command]git config gc.auto 0
2020-02-11T04:36:31.5371821Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-02-11T04:36:31.5431761Z ##[command]git config --get-all http.proxy
2020-02-11T04:36:31.5580578Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/69008/merge:refs/remotes/pull/69008/merge
---
2020-02-11T04:39:49.8195905Z E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
2020-02-11T04:39:49.8243165Z 
2020-02-11T04:39:49.8349447Z ##[error]Bash exited with code '100'.
2020-02-11T04:39:49.8362514Z ##[section]Finishing: Install awscli
2020-02-11T04:39:49.8383976Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69008/merge to s
2020-02-11T04:39:49.8386158Z Task         : Get sources
2020-02-11T04:39:49.8386205Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-11T04:39:49.8386252Z Version      : 1.0.0
2020-02-11T04:39:49.8386312Z Author       : Microsoft
2020-02-11T04:39:49.8386312Z Author       : Microsoft
2020-02-11T04:39:49.8386361Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-02-11T04:39:49.8386411Z ==============================================================================
2020-02-11T04:39:50.2610920Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-02-11T04:39:50.2652804Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69008/merge to s
2020-02-11T04:39:50.2772815Z Cleaning up task key
2020-02-11T04:39:50.2773585Z Start cleaning up orphan processes.
2020-02-11T04:39:50.2883175Z Terminate orphan process: pid (4110) (python)
2020-02-11T04:39:50.3091810Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@matthewjasper
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Feb 12, 2020

📌 Commit 34cf0b3 has been approved by matthewjasper

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 12, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 13, 2020
…atthewjasper

Properly use parent generics for opaque types

Fixes rust-lang#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.
bors added a commit that referenced this pull request Feb 13, 2020
Rollup of 9 pull requests

Successful merges:

 - #67642 (Relax bounds on HashMap/HashSet)
 - #68848 (Hasten macro parsing)
 - #69008 (Properly use parent generics for opaque types)
 - #69048 (Suggestion when encountering assoc types from hrtb)
 - #69049 (Optimize image sizes)
 - #69050 (Micro-optimize the heck out of LEB128 reading and writing.)
 - #69068 (Make the SGX arg cleanup implementation a NOP)
 - #69082 (When expecting `BoxFuture` and using `async {}`, suggest `Box::pin`)
 - #69104 (bootstrap: Configure cmake when building sanitizer runtimes)

Failed merges:

r? @ghost
@bors bors merged commit 34cf0b3 into rust-lang:master Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
6 participants