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

process nested obligations in autoderef #54252

Open
wants to merge 7 commits into
base: master
from

Conversation

Projects
None yet
10 participants
@arielb1
Contributor

arielb1 commented Sep 15, 2018

Fixes #53843.

r? @nikomatsakis

@eddyb

This comment has been minimized.

Member

eddyb commented Sep 16, 2018

IIUC, a fix isn't needed because the original code can be switched to use P::Target instead of a type parameter T used with P: Deref<Target = T>.

@arielb1

This comment has been minimized.

Contributor

arielb1 commented Sep 16, 2018

@eddyb

I agree that this makes the bug workaroundable and therefore less urgent. However, this is still a bug that should be fixed..

@arielb1 arielb1 force-pushed the arielb1:deref-query branch from c7f7cf7 to 65b44db Sep 16, 2018

@rust-highfive

This comment has been minimized.

Collaborator

rust-highfive commented Sep 16, 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.

[00:04:52] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:04:52] tidy error: /checkout/src/librustc_typeck/check/method/probe.rs:261: XXX is deprecated; use FIXME
[00:04:52] tidy error: /checkout/src/librustc_typeck/check/method/probe.rs:265: XXX is deprecated; use FIXME
[00:04:52] tidy error: /checkout/src/librustc_typeck/check/method/probe.rs:268: line longer than 100 chars
[00:04:52] tidy error: /checkout/src/librustc_typeck/check/method/probe.rs:327: line longer than 100 chars
[00:04:52] tidy error: /checkout/src/librustc_typeck/check/method/probe.rs:422: line longer than 100 chars
[00:04:52] tidy error: /checkout/src/librustc_typeck/check/method/probe.rs:519: line longer than 100 chars
[00:04:52] tidy error: /checkout/src/librustc_typeck/check/method/probe.rs:696: line longer than 100 chars
[00:04:52] tidy error: /checkout/src/librustc_typeck/check/method/probe.rs:1020: line longer than 100 chars
[00:04:53] some tidy checks failed
[00:04:53] 
[00:04:53] 
[00:04:53] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:04:53] 
[00:04:53] 
[00:04:53] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:53] Build completed unsuccessfully in 0:00:54
[00:04:53] Build completed unsuccessfully in 0:00:54
[00:04:53] Makefile:79: recipe for target 'tidy' failed
[00:04:53] make: *** [tidy] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:27d13364
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:004b1b06:start=1537132315822987460,finish=1537132315827473271,duration=4485811
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0f80f856
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb -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:07800a78
travis_time:start:07800a78
$ 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:10abce7c
$ 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)

@rust-highfive

This comment has been minimized.

Collaborator

rust-highfive commented Sep 16, 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.

[00:04:46] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:04:46] tidy error: /checkout/src/librustc_typeck/check/method/probe.rs:261: XXX is deprecated; use FIXME
[00:04:46] tidy error: /checkout/src/librustc_typeck/check/method/probe.rs:265: XXX is deprecated; use FIXME
[00:04:46] tidy error: /checkout/src/librustc_typeck/check/method/probe.rs:268: line longer than 100 chars
[00:04:46] tidy error: /checkout/src/librustc_typeck/check/method/probe.rs:327: line longer than 100 chars
[00:04:46] tidy error: /checkout/src/librustc_typeck/check/method/probe.rs:422: line longer than 100 chars
[00:04:46] tidy error: /checkout/src/librustc_typeck/check/method/probe.rs:519: line longer than 100 chars
[00:04:46] tidy error: /checkout/src/librustc_typeck/check/method/probe.rs:696: line longer than 100 chars
[00:04:46] tidy error: /checkout/src/librustc_typeck/check/method/probe.rs:1020: line longer than 100 chars
[00:04:48] some tidy checks failed
[00:04:48] 
[00:04:48] 
[00:04:48] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:04:48] 
[00:04:48] 
[00:04:48] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:48] Build completed unsuccessfully in 0:00:52
[00:04:48] Build completed unsuccessfully in 0:00:52
[00:04:48] Makefile:79: recipe for target 'tidy' failed
[00:04:48] make: *** [tidy] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:03a86660
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:02998971:start=1537133089912917146,finish=1537133089919141018,duration=6223872
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:13da7197
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb -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:00052690
travis_time:start:00052690
$ 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:0130f3a9
$ 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)

@nikomatsakis

At first read, seems reasonable (for what it is). Should we check perf? It feels like these are some common operations.

@nikomatsakis

This comment has been minimized.

Contributor

nikomatsakis commented Sep 18, 2018

@bors try

@bors

This comment has been minimized.

Contributor

bors commented Sep 18, 2018

⌛️ Trying commit 2f4f9ed with merge 927ffd5...

bors added a commit that referenced this pull request Sep 18, 2018

Auto merge of #54252 - arielb1:deref-query, r=<try>
process nested obligations in autoderef

This is a hack-fix to #53843, but I am worried it might break things because it makes the "inference pollution" problem worse.

I need to do the "autoderef querification" thing somehow to solve t.

Fixes #53843 (but introduces a bug that someone might notice).

r? @nikomatsakis
@bors

This comment has been minimized.

Contributor

bors commented Sep 18, 2018

💔 Test failed - status-travis

@rust-highfive

This comment has been minimized.

Collaborator

rust-highfive commented Sep 18, 2018

The job dist-x86_64-linux 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.
✓ uploaded script
travis_fold:end:step_upload_script
travis_fold:start:worker_info
Worker information
hostname: 1779a2a6-e81a-4e44-ad23-cd082c5254fe@1.production-2-worker-org-gce-zfk4
instance: travis-job-e1fec006-941d-4f3f-8aa2-c82089310c43 travis-ci-connie-trusty-1512502258-986baf0 (via amqp)
startup: 6.405881021s
travis_fold:end:worker_info
travis_fold:start:system_info
---
travis_fold:end:services

travis_fold:start:git.checkout
travis_time:start:0b58bca6
$ git clone --depth=2 --branch=try https://github.com/rust-lang/rust.git rust-lang/rust
---
[01:31:01] [ 86%] Building CXX object ELF/CMakeFiles/lldELF.dir/InputFiles.cpp.o
[01:31:02] [ 87%] Building CXX object ELF/CMakeFiles/lldELF.dir/InputSection.cpp.o
[01:31:06] [ 88%] Building CXX object ELF/CMakeFiles/lldELF.dir/LTO.cpp.o
[01:31:06] [ 89%] Building CXX object ELF/CMakeFiles/lldELF.dir/LinkerScript.cpp.o
[01:31:07] /checkout/src/tools/lld/ELF/InputFiles.cpp:132:43: error: non-const lvalue reference to type 'unique_ptr<llvm::DWARFCompileUnit, default_delete<llvm::DWARFCompileUnit>>' cannot bind to a value of unrelated type 'unique_ptr<llvm::DWARFUnit, default_delete<llvm::DWARFUnit>>'
[01:31:07]   for (std::unique_ptr<DWARFCompileUnit> &CU : Dwarf->compile_units()) {
[01:31:07]                                           ^  ~
[01:31:07] /checkout/src/llvm/include/llvm/ADT/iterator_range.h:46:13: note: selected 'begin' function with iterator type 'std::unique_ptr<llvm::DWARFUnit, std::default_delete<llvm::DWARFUnit> > *'
[01:31:07]   IteratorT begin() const { return begin_iterator; }
[01:31:07] 1 error generated.
[01:31:07] 1 error generated.
[01:31:07] gmake[2]: *** [ELF/CMakeFiles/lldELF.dir/InputFiles.cpp.o] Error 1
[01:31:07] gmake[2]: *** Waiting for unfinished jobs....
[01:31:12] gmake[1]: *** [ELF/CMakeFiles/lldELF.dir/all] Error 2
[01:31:12] gmake: *** [all] Error 2
[01:31:12] command did not execute successfully, got: exit code: 2
[01:31:12] 
[01:31:12] 
[01:31:12] build script failed, must exit now', /cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.33/src/lib.rs:773:5
[01:31:12]  finished in 81.639
[01:31:12] travis_fold:end:lld

[01:31:12] travis_time:end:lld:start=1537296249950359339,finish=1537296331590334580,duration=81639975241
---
travis_time:end:02a8e84a:start=1537296333158766697,finish=1537296333163518306,duration=4751609
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:2615d430
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb -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:11dcb0e8
travis_time:start:11dcb0e8
$ 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:0a56536e
$ 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)

@arielb1

This comment has been minimized.

Contributor

arielb1 commented Sep 21, 2018

@nikomatsakis

Sure, a perf run would be nice. I would not bother with figuring out the best caching strategy if it is pointless.

@arielb1

This comment has been minimized.

Contributor

arielb1 commented Sep 21, 2018

Try build failure looks quite spurious to my eyes

@nikomatsakis

This comment has been minimized.

Contributor

nikomatsakis commented Sep 21, 2018

Yeah, the try build failure does look spurious. I'm not sure how to rerun.

@bors try-

@nikomatsakis

This comment has been minimized.

Contributor

nikomatsakis commented Sep 21, 2018

@bors try

@arielb1 arielb1 force-pushed the arielb1:deref-query branch from 2f4f9ed to 6e93cf3 Sep 22, 2018

@matthiaskrgr

This comment has been minimized.

Contributor

matthiaskrgr commented Sep 22, 2018

Are all these submodule changes intended?

@arielb1

This comment has been minimized.

Contributor

arielb1 commented Sep 22, 2018

@arielb1 arielb1 force-pushed the arielb1:deref-query branch 2 times, most recently from 5d621ac to 88f7e57 Sep 22, 2018

@arielb1

This comment has been minimized.

Contributor

arielb1 commented Sep 23, 2018

@bors try

@bors

This comment has been minimized.

Contributor

bors commented Sep 23, 2018

⌛️ Trying commit 88f7e57 with merge 0b9d15f...

bors added a commit that referenced this pull request Sep 23, 2018

Auto merge of #54252 - arielb1:deref-query, r=<try>
process nested obligations in autoderef

This is a hack-fix to #53843, but I am worried it might break things because it makes the "inference pollution" problem worse.

I need to do the "autoderef querification" thing somehow to solve t.

Fixes #53843 (but introduces a bug that someone might notice).

r? @nikomatsakis
@bors

This comment has been minimized.

Contributor

bors commented Sep 23, 2018

☀️ Test successful - status-travis
State: approved= try=True

@nikomatsakis

This comment has been minimized.

Contributor

nikomatsakis commented Sep 24, 2018

@rust-timer

This comment has been minimized.

rust-timer commented Sep 24, 2018

Success: Queued 0b9d15f with parent 2287a7a, comparison URL.

@nikomatsakis

This comment has been minimized.

Contributor

nikomatsakis commented Dec 6, 2018

@arielb1 nice, will look asap =)

@bors

This comment has been minimized.

Contributor

bors commented Dec 8, 2018

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

@nikomatsakis

Sorry for the delay. Been a crazy week. Basically r=me, but I'm wondering whether it makes sense to do a crater run for something this potentially far-reaching. What do you think, @arielb1 ?

/// that care about regions) with this function, you have to
/// do it yourself, by e.g. having them be a part of the answer.
///
/// TDFX(nikomatsakis): not sure this is the best name.

This comment has been minimized.

@nikomatsakis

nikomatsakis Dec 11, 2018

Contributor

Maybe make_query_response_ignoring_pending_obligations or something?

@arielb1

This comment has been minimized.

Contributor

arielb1 commented Dec 14, 2018

Do we have mid-release crater runs anymore? I'll prefer to rely on them.

arielb1 added some commits Sep 15, 2018

process nested obligations in autoderef
This is a hack-fix to #53843, but I am worried it might break things
because it makes the "inference pollution" problem worse.

Fixes #53843 (but introduces a bug that someone might notice).
remove the typeck::autoderef::Autoderef fcx field
This allows using it in an fcx-independent context
@Mark-Simulacrum

This comment has been minimized.

Member

Mark-Simulacrum commented Dec 14, 2018

Not sure what you mean by mid-release crater runs, but I think it may make sense to run crater here. I'll get the ball rolling, if we decide to go ahead, @bors try

@bors

This comment has been minimized.

Contributor

bors commented Dec 14, 2018

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout deref-query (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self deref-query --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging src/librustc_typeck/lib.rs
Auto-merging src/librustc_typeck/check/wfcheck.rs
Auto-merging src/librustc_typeck/check/mod.rs
CONFLICT (content): Merge conflict in src/librustc_typeck/check/mod.rs
Auto-merging src/librustc_typeck/check/method/probe.rs
Auto-merging src/librustc_typeck/check/method/mod.rs
Auto-merging src/librustc_typeck/check/method/confirm.rs
Auto-merging src/librustc_typeck/check/coercion.rs
Auto-merging src/librustc_typeck/check/callee.rs
Auto-merging src/librustc_typeck/check/autoderef.rs
Auto-merging src/librustc/ty/query/mod.rs
Auto-merging src/librustc/ty/query/config.rs
Auto-merging src/librustc/dep_graph/dep_node.rs
Automatic merge failed; fix conflicts and then commit the result.

@nikomatsakis

This comment has been minimized.

Contributor

nikomatsakis commented Dec 14, 2018

@arielb1 I took the liberty of rebasing this for you

@nikomatsakis nikomatsakis force-pushed the arielb1:deref-query branch from 9babfd6 to 205295f Dec 14, 2018

@arielb1

This comment has been minimized.

Contributor

arielb1 commented Dec 14, 2018

@nikomatsakis

No need. I already had a rebased commit.

@arielb1 arielb1 force-pushed the arielb1:deref-query branch from 205295f to 0152d33 Dec 14, 2018

@arielb1

This comment has been minimized.

Contributor

arielb1 commented Dec 14, 2018

@bors try

@bors

This comment has been minimized.

Contributor

bors commented Dec 14, 2018

⌛️ Trying commit 0152d33 with merge 52335ac...

bors added a commit that referenced this pull request Dec 14, 2018

Auto merge of #54252 - arielb1:deref-query, r=<try>
process nested obligations in autoderef

Fixes #53843.

r? @nikomatsakis
@arielb1

This comment has been minimized.

Contributor

arielb1 commented Dec 14, 2018

@bors try-

@arielb1

This comment has been minimized.

Contributor

arielb1 commented Dec 14, 2018

@bors try

@bors

This comment has been minimized.

Contributor

bors commented Dec 14, 2018

⌛️ Trying commit b4db387 with merge 0b8c582...

bors added a commit that referenced this pull request Dec 14, 2018

Auto merge of #54252 - arielb1:deref-query, r=<try>
process nested obligations in autoderef

Fixes #53843.

r? @nikomatsakis
@bors

This comment has been minimized.

Contributor

bors commented Dec 15, 2018

☀️ Test successful - status-travis
State: approved= try=True

@nikomatsakis

This comment has been minimized.

Contributor

nikomatsakis commented Dec 17, 2018

@craterbot run start=master#96d1334e567237b1507cd277938e7ae2de75ff51 end=try#0b8c5828f68d7b2840b81fa51239346dc97fef5a mode=check-only

@craterbot

This comment has been minimized.

Collaborator

craterbot commented Dec 17, 2018

👌 Experiment pr-54252 created and queued.
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot

This comment has been minimized.

Collaborator

craterbot commented Dec 17, 2018

🚧 Experiment pr-54252 is now running on agent aws-1.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

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