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

Lift TypeFoldable over Result and remove the Relate hack in combine/nll #58333

Open
wants to merge 5 commits into
base: master
from

Conversation

Projects
None yet
7 participants
@arielb1
Copy link
Contributor

arielb1 commented Feb 9, 2019

No functional changes intended - just a cleanup.

r? @nikomatsakis

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Feb 9, 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:11f30564:start=1549751305892799430,finish=1549751306856293444,duration=963494014
$ 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
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---

[00:03:51] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:03:51] tidy error: /checkout/src/librustc/traits/query/normalize.rs:194: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/traits/project.rs:398: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/traits/structural_impls.rs:751: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/traits/structural_impls.rs:761: TODO is deprecated; use FIXME
[00:03:51] tidy error: /checkout/src/librustc/traits/structural_impls.rs:885: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/traits/structural_impls.rs:901: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/traits/structural_impls.rs:942: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/traits/structural_impls.rs:963: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/infer/combine.rs:359: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/ty/subst.rs:132: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/ty/subst.rs:435: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/ty/fold.rs:46: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/ty/fold.rs:47: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/ty/fold.rs:203: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/ty/fold.rs:433: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/ty/fold.rs:495: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/ty/fold.rs:758: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/ty/structural_impls.rs:599: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/ty/structural_impls.rs:824: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/ty/structural_impls.rs:971: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/ty/structural_impls.rs:1176: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/mir/mod.rs:2627: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/mir/mod.rs:3118: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/mir/mod.rs:3285: TODO is deprecated; use FIXME
[00:03:51] tidy error: /checkout/src/librustc/mir/mod.rs:3286: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/mir/mod.rs:3303: line longer than 100 chars
[00:03:51] tidy error: /checkout/src/librustc/mir/mod.rs:3392: line longer than 100 chars
[00:03:52] some tidy checks failed
[00:03:52] 
[00:03:52] 
[00:03:52] 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:03:52] 
[00:03:52] 
[00:03:52] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:03:52] Build completed unsuccessfully in 0:00:44
[00:03:52] Build completed unsuccessfully in 0:00:44
[00:03:52] make: *** [tidy] Error 1
[00:03:52] Makefile:68: recipe for target 'tidy' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0ea87945
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Sat Feb  9 22:32:30 UTC 2019
---
travis_time:end:07946775:start=1549751551610346988,finish=1549751551614784069,duration=4437081
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:06031398
$ 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 --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:0006d81b
travis_time:start:0006d81b
$ 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:248c4f54
$ 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)

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 12, 2019

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

@arielb1 arielb1 force-pushed the arielb1:fold-result branch from 23f4f47 to 7abc7ed Feb 12, 2019

@arielb1

This comment has been minimized.

Copy link
Contributor Author

arielb1 commented Feb 13, 2019

I'll check that this doesn't hurt perf

@bors try

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 13, 2019

⌛️ Trying commit 7abc7ed with merge 258c318...

bors added a commit that referenced this pull request Feb 13, 2019

Auto merge of #58333 - arielb1:fold-result, r=<try>
Lift TypeFoldable over Result and remove the Relate hack in combine/nll

No functional changes intended - just a cleanup.

r? @nikomatsakis
@nikomatsakis
Copy link
Contributor

nikomatsakis left a comment

r=me

#[inline]
/// If `false` - the default - then `ty::Invariant` might be used instead of the
/// correct variance when folding an item with a variance.

This comment has been minimized.

@nikomatsakis

nikomatsakis Feb 13, 2019

Contributor

Nit: blank line in the middle of a /// comment? Seems unusual


/// Otherwise, the correct variance is looked up from the tcx, which can
/// be a performance and cycle hazard.
fn use_variances(&self) -> bool {

This comment has been minimized.

@nikomatsakis

nikomatsakis Feb 13, 2019

Contributor

This seems ok, but also error-prone. i.e., if somebody forgets to make use_variances be true, we'll have a problem. It might be worth thinking if we can turn that into a dynamic assertion or something. But I don't obviously see how to do that with this setup as in this PR -- I was imagining that if the variance was tracked in a field, then accessing it could assert that use_variances is true or something...

This comment has been minimized.

@arielb1

arielb1 Feb 16, 2019

Author Contributor

I could make variances an Option, but t hen the users would need to handle that. I think that forgetting to use use_variances would cause fairly visible errors, however, so I don't think this is a large risk.

fn a_is_expected(&self) -> bool {
true
fn use_variances(&self) -> bool {
if self.ambient_variance == ty::Variance::Invariant {

This comment has been minimized.

@nikomatsakis

nikomatsakis Feb 13, 2019

Contributor

So, in the branches that I was working on, I made the folder track the ambient variance iirc. I don't however remember exactly how I did this =)

This comment has been minimized.

@nikomatsakis

nikomatsakis Feb 13, 2019

Contributor

It's not a thing that Rust handles particularly well

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 13, 2019

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

@arielb1

This comment has been minimized.

Copy link
Contributor Author

arielb1 commented Feb 16, 2019

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Feb 16, 2019

Insufficient permissions to issue commands to rust-timer.

@arielb1

This comment has been minimized.

Copy link
Contributor Author

arielb1 commented Feb 16, 2019

Could someone with perfbot permissions give me a rust-timer build?

@oli-obk

This comment has been minimized.

Copy link
Contributor

oli-obk commented Feb 16, 2019

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Feb 16, 2019

Success: Queued 258c318 with parent e544947, comparison URL.

@arielb1 arielb1 force-pushed the arielb1:fold-result branch from 7abc7ed to 090f21e Feb 16, 2019

@arielb1

This comment has been minimized.

Copy link
Contributor Author

arielb1 commented Feb 16, 2019

I'm poking with the fairly hot TypeFoldable, so I want to see whether I have any weird perf impacts.

@arielb1

This comment has been minimized.

Copy link
Contributor Author

arielb1 commented Feb 16, 2019

@bors try

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 16, 2019

⌛️ Trying commit 090f21e with merge c5e0b61...

bors added a commit that referenced this pull request Feb 16, 2019

Auto merge of #58333 - arielb1:fold-result, r=<try>
Lift TypeFoldable over Result and remove the Relate hack in combine/nll

No functional changes intended - just a cleanup.

r? @nikomatsakis
@arielb1

This comment has been minimized.

Copy link
Contributor Author

arielb1 commented Feb 16, 2019

Bad github, deleting my test results like that, now I need another try

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Feb 16, 2019

Finished benchmarking try commit 258c318

@arielb1

This comment has been minimized.

Copy link
Contributor Author

arielb1 commented Feb 16, 2019

Serde is very red in this PR (24%!). Need to investigate why.

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 16, 2019

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

@Mark-Simulacrum

This comment has been minimized.

Copy link
Member

Mark-Simulacrum commented Feb 17, 2019

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Feb 17, 2019

Success: Queued c5e0b61 with parent eac0908, comparison URL.

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Feb 17, 2019

Finished benchmarking try commit c5e0b61

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