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

process nested obligations in autoderef #54252

Merged
merged 7 commits into from
Dec 20, 2018
Merged

Conversation

arielb1
Copy link
Contributor

@arielb1 arielb1 commented Sep 15, 2018

Fixes #53843.

r? @nikomatsakis

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 15, 2018
@eddyb
Copy link
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
Copy link
Contributor Author

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..

@rust-highfive
Copy link
Collaborator

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
Copy link
Collaborator

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)

Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@nikomatsakis
Copy link
Contributor

@bors try

@bors
Copy link
Contributor

bors commented Sep 18, 2018

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

bors added a commit that referenced this pull request Sep 18, 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.

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
Copy link
Contributor

bors commented Sep 18, 2018

💔 Test failed - status-travis

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 18, 2018
@rust-highfive
Copy link
Collaborator

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
Copy link
Contributor Author

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
Copy link
Contributor Author

arielb1 commented Sep 21, 2018

Try build failure looks quite spurious to my eyes

@nikomatsakis
Copy link
Contributor

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

@bors try-

@nikomatsakis
Copy link
Contributor

@bors try

@matthiaskrgr
Copy link
Member

Are all these submodule changes intended?

@arielb1
Copy link
Contributor Author

arielb1 commented Sep 22, 2018

@matthiaskrgr

No.

@arielb1 arielb1 force-pushed the deref-query branch 2 times, most recently from 5d621ac to 88f7e57 Compare September 22, 2018 21:26
@arielb1
Copy link
Contributor Author

arielb1 commented Sep 23, 2018

@bors try

@bors
Copy link
Contributor

bors commented Sep 23, 2018

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

bors added a commit that referenced this pull request Sep 23, 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.

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
Copy link
Contributor

bors commented Sep 23, 2018

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

@nikomatsakis
Copy link
Contributor

@rust-timer build 0b9d15f

@rust-timer
Copy link
Collaborator

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

@bors
Copy link
Contributor

bors commented Dec 14, 2018

⌛ Trying commit 0152d33 with merge 52335ac987cf385dd4b2f6926b273fd6462c0ade...

@arielb1
Copy link
Contributor Author

arielb1 commented Dec 14, 2018

@bors try-

@arielb1
Copy link
Contributor Author

arielb1 commented Dec 14, 2018

@bors try

@bors
Copy link
Contributor

bors commented Dec 14, 2018

⌛ Trying commit b4db387 with merge 0b8c5828f68d7b2840b81fa51239346dc97fef5a...

@bors
Copy link
Contributor

bors commented Dec 15, 2018

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

@nikomatsakis
Copy link
Contributor

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

@craterbot
Copy link
Collaborator

👌 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 craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 17, 2018
@craterbot
Copy link
Collaborator

🚧 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

@craterbot
Copy link
Collaborator

🎉 Experiment pr-54252 is completed!
📊 0 regressed and 0 fixed (50551 total)
📰 Open the full report.

⚠️ If you notice any spurious failure please add them to the blacklist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Dec 18, 2018
@arielb1
Copy link
Contributor Author

arielb1 commented Dec 19, 2018

Yay!

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Dec 19, 2018

📌 Commit b4db387 has been approved by nikomatsakis

@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 Dec 19, 2018
@bors
Copy link
Contributor

bors commented Dec 19, 2018

⌛ Testing commit b4db387 with merge daa8792...

bors added a commit that referenced this pull request Dec 19, 2018
process nested obligations in autoderef

Fixes #53843.

r? @nikomatsakis
@bors
Copy link
Contributor

bors commented Dec 20, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing daa8792 to master...

@bors bors merged commit b4db387 into rust-lang:master Dec 20, 2018
bors added a commit that referenced this pull request Feb 9, 2019
Avoid committing to autoderef in object method probing

This fixes the "leak" introduced in #57835 (see test for details, also apparently #54252 had no tests for the "leaks" that were fixed in it, so go ahead and add one).

Maybe beta-nominating because regression, but I'm against landing things on beta we don't have to.

r? @nikomatsakis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants