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

universes refactor 3 #55305

Merged
merged 11 commits into from Nov 2, 2018

Conversation

Projects
None yet
9 participants
@nikomatsakis
Contributor

nikomatsakis commented Oct 24, 2018

Some more refactorings from my universe branch. These are getting a bit more "invasive" -- they start to plumb the universe information through the canonicalization process. As of yet though I don't believe this branch changes our behavior in any notable way, though I'm marking the branch as WIP to give myself a chance to verify this.

r? @scalexm

@rust-highfive

This comment was marked as outdated.

Collaborator

rust-highfive commented Oct 24, 2018

r? @cramertj

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

@nikomatsakis

This comment has been minimized.

Contributor

nikomatsakis commented Oct 24, 2018

@rust-highfive rust-highfive assigned scalexm and unassigned cramertj Oct 24, 2018

@rust-highfive

This comment was marked as outdated.

Collaborator

rust-highfive commented Oct 24, 2018

The job x86_64-gnu-llvm-5.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:0503c469:start=1540375314282352514,finish=1540375316541289161,duration=2258936647
$ 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
Setting environment variables from repository settings
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
---
[00:50:56] .................................................................................................... 2200/4943
[00:51:01] .................................................................................................... 2300/4943
[00:51:05] .................................................................................................... 2400/4943
[00:51:09] .................................................................................................... 2500/4943
[00:51:12] ................................................iiiiiiiii........................................... 2600/4943
[00:51:16] ..................................................................................................ii 2700/4943
[00:51:23] .................................................................................................... 2900/4943
[00:51:26] ........................................................................................i........... 3000/4943
[00:51:28] .................................................................................................... 3100/4943
[00:51:31] ...............................................i.i..ii.............................................. 3200/4943
---
travis_time:start:test_mir-opt
Check compiletest suite=mir-opt mode=mir-opt (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:04:05] 
[01:04:05] running 48 tests
[01:04:05] ERROR 2018-10-24T11:06:11Z: compiletest::runtest: None
ead(_3);
[01:04:25]        StorageLive(_4);
[01:04:25]        _4 = std::option::Option<std::boxed::Box<u32>>::None;
[01:04:25]        FakeRead(ForLet, _4);
[01:04:25]        AscribeUserType(_4, o, Ty(Canonical { variables: [], value: std::option::Option<std::boxed::Box<u32>> }));
[01:04:25]        StorageLive(_5);
[01:04:25]        StorageLive(_6);
[01:04:25]        _6 = move _4;
[01:04:25]        replace(_5 <- move _6) -> [return: bb2, unwind: bb5];
[01:04:25] ... (elided)
[01:04:25]    bb2: {
[01:04:25]    bb2: {
[01:04:25]        drop(_6) -> [return: bb6, unwind: bb4];
[01:04:25] ... (elided)
[01:04:25]    bb5: {
[01:04:25]        drop(_6) -> bb4;
[01:04:25]    }
[01:04:25]    }
[01:04:25] Actual:
[01:04:25] fn main() -> (){
[01:04:25]     let mut _0: ();
[01:04:25]     scope 1 {
[01:04:25]         scope 3 {
[01:04:25]             scope 5 {
[01:04:25]                 scope 7 {
[01:04:25]                 scope 8 {
[01:04:25]                 scope 8 {
[01:04:25]                     let _5: std::option::Option<std::boxed::Box<u32>>;
[01:04:25]             }
[01:04:25]             scope 6 {
[01:04:25]             scope 6 {
[01:04:25]                 let _4: std::option::Option<std::boxed::Box<u32>> as (Ty(Canonical { max_universe: U0, variables: [], value: std::option::Option<std::boxed::Box<u32>> }), /checkout/src/test/mir-opt/basic_assignment.rs:37:18: 37:34);
[01:04:25]         }
[01:04:25]         scope 4 {
[01:04:25]         scope 4 {
[01:04:25]             let _2: bool;
[01:04:25]     }
[01:04:25]     scope 2 {
[01:04:25]     scope 2 {
[01:04:25]         let _1: bool;
[01:04:25]     }
[01:04:25]     let mut _3: bool;
[01:04:25]     let mut _6: std::option::Option<std::boxed::Box<u32>>;
[01:04:25]     bb0: {                              
[01:04:25]         StorageLive(_1);
[01:04:25]         _1 = const false;
[01:04:25]         FakeRead(ForLet, _1);
[01:04:25]         StorageLive(_2);
[01:04:25]         StorageLive(_3);
[01:04:25]         _3 = _1;
[01:04:25]         _2 = move _3;
[01:04:25]         StorageDead(_3);
[01:04:25]         StorageLive(_4);
[01:04:25]         _4 = std::option::Option<std::boxed::Box<u32>>::None;
[01:04:25]         FakeRead(ForLet, _4);
[01:04:25]         AscribeUserType(_4, o, Ty(Canonical { max_universe: U0, variables: [], value: std::option::Option<std::boxed::Box<u32>> }));
[01:04:25]         StorageLive(_5);
[01:04:25]         StorageLive(_6);
[01:04:25]         _6 = move _4;
[01:04:25]         replace(_5 <- move _6) -> [return: bb2, unwind: bb5];
[01:04:25]     bb1: {
[01:04:25]         resume;
[01:04:25]     }
[01:04:25]     }
[01:04:25]     bb2: {                              
[01:04:25]         drop(_6) -> [return: bb6, unwind: bb4];
[01:04:25]     bb3: {
[01:04:25]         drop(_4) -> bb1;
[01:04:25]     }
[01:04:25]     bb4: {
[01:04:25]     bb4: {
[01:04:25]         drop(_5) -> bb3;
[01:04:25]     }
[01:04:25]     bb5: {
[01:04:25]         drop(_6) -> bb4;
[01:04:25]     }
[01:04:25]     bb6: {                              
[01:04:25]         StorageDead(_6);
[01:04:25]         _0 = ();
[01:04:25]         drop(_5) -> [return: bb7, unwind: bb3];
[01:04:25]     }
[01:04:25]     bb7: {                              
[01:04:25]         StorageDead(_5);
[01:04:25]         drop(_4) -> [return: bb8, unwind: bb1];
[01:04:25]     }
[01:04:25]     bb8: {                              
[01:04:25]         StorageDead(_4);
[01:04:25]         StorageDead(_2);
[01:04:25]         StorageDead(_1);
[01:04:25]         return;
[01:04:25] }', tools/compiletest/src/runtest.rs:2939:13
[01:04:25] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:04:25] 
[01:04:25] 
[01:04:25] 
[01:04:25] failures:
[01:04:25]     [mir-opt] mir-opt/basic_assignment.rs
[01:04:25] 
[01:04:25] test result: FAILED. 47 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
[01:04:25] 
[01:04:25] 
[01:04:25] 
[01:04:25] 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/mir-opt" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "mir-opt" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-5.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--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" "5.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:04:25] 
[01:04:25] 
[01:04:25] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:04:25] Build completed unsuccessfully in 0:18:17
---
38056 ./obj/build/x86_64-unknown-linux-gnu/test/ui/issues
37756 ./src/tools/lldb/www
37524 ./obj/build/x86_64-unknown-linux-gnu/doc/core/arch
37520 ./obj/build/x86_64-unknown-linux-gnu/stage0-std
364\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:05d40728
travis_time:start:05d40728
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:306b287c
$ dmesg | grep -i kill

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)

Region,
Region(ty::UniverseIndex),
/// Region variable `'?R`.

This comment has been minimized.

@scalexm

scalexm Oct 24, 2018

Member

I don't think you wanted the exact same comment as the one above?

This comment has been minimized.

@nikomatsakis

nikomatsakis Oct 24, 2018

Contributor

Fixed.

@nikomatsakis nikomatsakis changed the title from [WIP] Universes refactor 3 to universes refactor 3 Oct 24, 2018

@nikomatsakis

This comment has been minimized.

Contributor

nikomatsakis commented Oct 24, 2018

I'm removing the WIP tag. =) Though I would still like to spend a bit of time looking carefully over the code. But I guess the test suite passing is a good sign I've not changed much behavior here ;)

@nikomatsakis

This comment has been minimized.

Contributor

nikomatsakis commented Oct 24, 2018

There might be room though for an assert or two -- e.g., in the canonicalization code -- checking that we don't have any universes in places we don't expect them.

@scalexm

This comment has been minimized.

Member

scalexm commented Oct 25, 2018

Nothing strikes me regarding changes of behavior.

r=me if you ever want to add those asserts

@nikomatsakis

This comment has been minimized.

Contributor

nikomatsakis commented Oct 26, 2018

@bors r=scalexm

@bors

This comment has been minimized.

Contributor

bors commented Oct 26, 2018

📌 Commit bcc2a7f has been approved by scalexm

@bors

This comment has been minimized.

Contributor

bors commented Oct 27, 2018

☔️ The latest upstream changes (presumably #55274) made this pull request unmergeable. Please resolve the merge conflicts.

nikomatsakis added some commits Sep 28, 2018

allow canonicalized regions to carry universe and track max-universe
But.. we don't really use it for anything right now.
extend query response to potentially contain fresh universes
The idea here is that an incoming query may refer to some universes,
and they query response may contain fresh universes that go beyond
those. When we instantiate the query response in the caller's scope,
therefore, we map those new universes into fresh universes for the
caller.
distinguish user-type annotations from other annotations
In particular, we don't want to preserve the universes for the `'_`
variables that appear in there. And we don't expect to find any
placeholders, which justifies this as harmless.

(In particular, if you have a query like `Foo(!1, !2, ?3)`, then you
care about the universe of `?3`, since it may control whether `?3 =
!1` and `?3 = !2` is a valid answer. But without any placeholders, we
don't really care: any placeholders that would appear in the output
must therefore come from some fresh universe anyway.)
apply minimum bounds when checking closure signature
Required for test expect-fn-supply-fn.rs to pass; otherwise we have
unconstrained inference variables that get inferred to `'empty`.
@nikomatsakis

This comment has been minimized.

Contributor

nikomatsakis commented Oct 27, 2018

@bors r=scalexm

@bors

This comment has been minimized.

Contributor

bors commented Oct 27, 2018

📌 Commit 36516e8 has been approved by scalexm

@bors

This comment has been minimized.

Contributor

bors commented Oct 29, 2018

📌 Commit 36516e8 has been approved by scalexm

@bors

This comment has been minimized.

Contributor

bors commented Oct 31, 2018

⌛️ Testing commit 36516e8 with merge f9c5141...

bors added a commit that referenced this pull request Oct 31, 2018

Auto merge of #55305 - nikomatsakis:universes-refactor-3, r=scalexm
universes refactor 3

Some more refactorings from my universe branch. These are getting a bit more "invasive" -- they start to plumb the universe information through the canonicalization process. As of yet though I don't **believe** this branch changes our behavior in any notable way, though I'm marking the branch as `WIP` to give myself a chance to verify this.

r? @scalexm
@pietroalbini

This comment has been minimized.

Member

pietroalbini commented Oct 31, 2018

Bors was testing two PRs at once.

@bors retry

nikomatsakis added some commits Oct 31, 2018

fix bug in NLL error reporting
Account for incompatible universes and higher-ranked subtyping.
@nikomatsakis

This comment has been minimized.

Contributor

nikomatsakis commented Oct 31, 2018

@bors r=scalexm

@bors

This comment has been minimized.

Contributor

bors commented Oct 31, 2018

📌 Commit c244fd7 has been approved by scalexm

@nikomatsakis

This comment has been minimized.

Contributor

nikomatsakis commented Nov 1, 2018

@bors p=1

@scalexm requested that I give this p=1, as they have a number of things blocked on it

@bors

This comment has been minimized.

Contributor

bors commented Nov 1, 2018

⌛️ Testing commit c244fd7 with merge 29f782c...

bors added a commit that referenced this pull request Nov 1, 2018

Auto merge of #55305 - nikomatsakis:universes-refactor-3, r=scalexm
universes refactor 3

Some more refactorings from my universe branch. These are getting a bit more "invasive" -- they start to plumb the universe information through the canonicalization process. As of yet though I don't **believe** this branch changes our behavior in any notable way, though I'm marking the branch as `WIP` to give myself a chance to verify this.

r? @scalexm
@bors

This comment has been minimized.

Contributor

bors commented Nov 1, 2018

💔 Test failed - status-appveyor

@scalexm

This comment has been minimized.

Member

scalexm commented Nov 1, 2018

yet another timeout, not the same job as the first one, and the build times seem to be varying randomly, so I believe this is not due to a perf problem?

@pietroalbini

This comment has been minimized.

Member

pietroalbini commented Nov 1, 2018

@bors retry

@bors

This comment has been minimized.

Contributor

bors commented Nov 2, 2018

⌛️ Testing commit c244fd7 with merge 5eda136...

bors added a commit that referenced this pull request Nov 2, 2018

Auto merge of #55305 - nikomatsakis:universes-refactor-3, r=scalexm
universes refactor 3

Some more refactorings from my universe branch. These are getting a bit more "invasive" -- they start to plumb the universe information through the canonicalization process. As of yet though I don't **believe** this branch changes our behavior in any notable way, though I'm marking the branch as `WIP` to give myself a chance to verify this.

r? @scalexm
@bors

This comment has been minimized.

Contributor

bors commented Nov 2, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: scalexm
Pushing 5eda136 to master...

@bors bors merged commit c244fd7 into rust-lang:master Nov 2, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@notriddle

This comment has been minimized.

Contributor

notriddle commented Nov 9, 2018

For the benefit of the viewing audience:

This is a part of #48049 (remove the leak check in favor of "universes")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment