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

Constrain all regions in the concrete type for an opaque type #60449

Merged
merged 1 commit into from May 4, 2019

Conversation

Projects
None yet
5 participants
@matthewjasper
Copy link
Contributor

commented May 1, 2019

push_outlives_components skips some regions in a type, notably the signature
of a closure is ignored. Most of the time this is OK, but for opaque types the
concrete type is used when checking auto-trait bounds in other functions.

cc @nikomatsakis @pnkfelix

Closes #57464
Closes #60127

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented May 1, 2019

r? @eddyb

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

@matthewjasper matthewjasper force-pushed the matthewjasper:impl-trait-outlives branch from 19cc7a4 to d69784e May 1, 2019

@eddyb

This comment has been minimized.

Copy link
Member

commented May 1, 2019

@rust-highfive rust-highfive assigned pnkfelix and unassigned eddyb May 1, 2019

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

commented May 1, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (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.
travis_time:end:0d8970bc:start=1556742845856096513,finish=1556742846763756174,duration=907659661
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[01:12:43] .................................................................................................... 600/2959
[01:12:58] .................................................................................................... 700/2959
[01:13:09] .................................................................................................... 800/2959
[01:13:18] .................................................................................................... 900/2959
[01:13:33] ...........................................F........................................................ 1000/2959
[01:13:56] .................................................................................................... 1200/2959
[01:14:06] .................................................................................................... 1300/2959
[01:14:18] ..........................ii........................................................................ 1400/2959
[01:14:30] .................................................................................................... 1500/2959
---
[01:18:12] failures:
[01:18:12] 
[01:18:12] ---- [run-pass] run-pass/impl-trait/lifetimes.rs stdout ----
[01:18:12] 
[01:18:12] error: test compilation failed although it shouldn't!
[01:18:12] status: exit code: 1
[01:18:12] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/run-pass/impl-trait/lifetimes.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/impl-trait/lifetimes/a" "-Crpath" "-O" "-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/run-pass/impl-trait/lifetimes/auxiliary"
[01:18:12] ------------------------------------------
[01:18:12] 
[01:18:12] ------------------------------------------
[01:18:12] stderr:
[01:18:12] stderr:
[01:18:12] ------------------------------------------
[01:18:12] error[E0482]: lifetime of return value does not outlive the function call
[01:18:12]   --> /checkout/src/test/run-pass/impl-trait/lifetimes.rs:112:66
[01:18:12]    |
[01:18:12] LL |     fn iter_doesnt_capture_unnecessary_lifetime<'s>(&'s self) -> impl Iterator<Item = &'s u8> {
[01:18:12]    |
[01:18:12] note: the return value is only valid for the lifetime 'unnecessary_lifetime as defined on the impl at 111:6
[01:18:12]   --> /checkout/src/test/run-pass/impl-trait/lifetimes.rs:111:6
[01:18:12]    |
[01:18:12]    |
[01:18:12] LL | impl<'unnecessary_lifetime> MyVec {
[01:18:12] 
[01:18:12] error: aborting due to previous error
[01:18:12] 
[01:18:12] 
---
[01:18:12] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:519:22
[01:18:12] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:18:12] 
[01:18:12] 
[01:18:12] 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/run-pass" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "run-pass" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -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" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:18:12] 
[01:18:12] 
[01:18:12] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:18:12] Build completed unsuccessfully in 0:10:52
[01:18:12] Build completed unsuccessfully in 0:10:52
[01:18:12] Makefile:48: recipe for target 'check' failed
[01:18:12] make: *** [check] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:106250d9
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Wed May  1 21:52:31 UTC 2019

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 matthewjasper force-pushed the matthewjasper:impl-trait-outlives branch from d69784e to 4a1c0ce May 1, 2019

@pnkfelix

This comment has been minimized.

Copy link
Member

commented May 2, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

commented May 2, 2019

📌 Commit 4a1c0ce has been approved by pnkfelix

@matthewjasper

This comment has been minimized.

Copy link
Contributor Author

commented May 2, 2019

@bors r- so that I can fix the comment

@matthewjasper matthewjasper force-pushed the matthewjasper:impl-trait-outlives branch from 4a1c0ce to d72f4de May 2, 2019

@matthewjasper

This comment has been minimized.

Copy link
Contributor Author

commented May 2, 2019

@bors r=pnkfelix

@bors

This comment has been minimized.

Copy link
Contributor

commented May 2, 2019

📌 Commit d72f4de has been approved by pnkfelix

Centril added a commit to Centril/rust that referenced this pull request May 2, 2019

Rollup merge of rust-lang#60449 - matthewjasper:impl-trait-outlives, …
…r=pnkfelix

Constrain all regions in the concrete type for an opaque type

`push_outlives_components` skips some regions in a type, notably the signature
of a closure is ignored. Most of the time this is OK, but for opaque types the
concrete type is used when checking auto-trait bounds in other functions.

cc @nikomatsakis @pnkfelix

Closes rust-lang#57464
Closes rust-lang#60127

bors added a commit that referenced this pull request May 3, 2019

Auto merge of #60488 - Centril:rollup-whygqpp, r=Centril
Rollup of 11 pull requests

Successful merges:

 - #59928 (Make deprecation lint `ambiguous_associated_items` deny-by-default)
 - #60135 (Added arm-none-eabi target)
 - #60220 (report fatal errors during doctest parsing)
 - #60373 (Tidy: ensure lang features are sorted by since)
 - #60393 ( Do not suggest incorrect syntax on pattern type error due to borrow)
 - #60401 (Rename `RUST_LOG` to `RUSTC_LOG`)
 - #60409 (Require a trait in the bounds of existential types)
 - #60449 (Constrain all regions in the concrete type for an opaque type)
 - #60455 (Resolve match arm ty when arms diverge)
 - #60457 (Const prop refactoring)
 - #60467 (Avoid repeated interning of static strings.)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request May 3, 2019

Rollup merge of rust-lang#60449 - matthewjasper:impl-trait-outlives, …
…r=pnkfelix

Constrain all regions in the concrete type for an opaque type

`push_outlives_components` skips some regions in a type, notably the signature
of a closure is ignored. Most of the time this is OK, but for opaque types the
concrete type is used when checking auto-trait bounds in other functions.

cc @nikomatsakis @pnkfelix

Closes rust-lang#57464
Closes rust-lang#60127

@Centril Centril referenced this pull request May 3, 2019

Closed

Rollup of 8 pull requests #60519

bors added a commit that referenced this pull request May 3, 2019

Auto merge of #60519 - Centril:rollup-jvrq9h1, r=Centril
Rollup of 8 pull requests

Successful merges:

 - #59520 (rustc_codegen_llvm: support 128-bit discriminants in debuginfo.)
 - #60426 (Stop `-O`/`-C opt-level` and `-g`/`-C debuginfo` conflicting)
 - #60429 (Account for paths in incorrect pub qualifier help)
 - #60449 (Constrain all regions in the concrete type for an opaque type)
 - #60476 (build dist-aarch64-linux with --enable-profiler)
 - #60486 (Place related refactors)
 - #60496 (Fix potential integer overflow in SGX memory range calculation.)
 - #60517 (Reword casting message)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request May 3, 2019

Rollup merge of rust-lang#60449 - matthewjasper:impl-trait-outlives, …
…r=pnkfelix

Constrain all regions in the concrete type for an opaque type

`push_outlives_components` skips some regions in a type, notably the signature
of a closure is ignored. Most of the time this is OK, but for opaque types the
concrete type is used when checking auto-trait bounds in other functions.

cc @nikomatsakis @pnkfelix

Closes rust-lang#57464
Closes rust-lang#60127

@Centril Centril referenced this pull request May 3, 2019

Closed

Rollup of 7 pull requests #60523

Centril added a commit to Centril/rust that referenced this pull request May 4, 2019

Rollup merge of rust-lang#60449 - matthewjasper:impl-trait-outlives, …
…r=pnkfelix

Constrain all regions in the concrete type for an opaque type

`push_outlives_components` skips some regions in a type, notably the signature
of a closure is ignored. Most of the time this is OK, but for opaque types the
concrete type is used when checking auto-trait bounds in other functions.

cc @nikomatsakis @pnkfelix

Closes rust-lang#57464
Closes rust-lang#60127

@Centril Centril referenced this pull request May 4, 2019

Merged

Rollup of 9 pull requests #60537

bors added a commit that referenced this pull request May 4, 2019

Auto merge of #60537 - Centril:rollup-42jxz82, r=Centril
Rollup of 9 pull requests

Successful merges:

 - #60429 (Account for paths in incorrect pub qualifier help)
 - #60449 (Constrain all regions in the concrete type for an opaque type)
 - #60486 (Place related refactors)
 - #60513 (Remove -Z borrowck=compare flag)
 - #60516 (Remove TypeckMir)
 - #60517 (Reword casting message)
 - #60520 (Add rustfmt toml)
 - #60521 (Migrate tidy to rust 2018 edition)
 - #60527 (Fix async fn lowering ICE with APIT.)

Failed merges:

r? @ghost

@bors bors merged commit d72f4de into rust-lang:master May 4, 2019

1 check passed

Travis CI - Pull Request Build Passed
Details

@matthewjasper matthewjasper deleted the matthewjasper:impl-trait-outlives branch May 12, 2019

@pnkfelix

This comment has been minimized.

Copy link
Member

commented May 17, 2019

based on a user request, nominating for backport to stable. (I am assuming a backport to beta in time for the beta-to-stable-rollover is simply not feasible at this point in the cycle.)

@matthewjasper

This comment has been minimized.

Copy link
Contributor Author

commented May 18, 2019

I've also nominated #60765 because it's essentially the second part of this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.