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

Refactor `TypeVariableOrigin` #59331

Merged
merged 4 commits into from Jun 6, 2019

Conversation

Projects
None yet
7 participants
@varkor
Copy link
Member

commented Mar 21, 2019

Removes some unused variants and extracts the common Span field.

As suggested in #59008 (comment).

r? @eddyb

@bors

This comment was marked as resolved.

Copy link
Contributor

commented Mar 24, 2019

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

@varkor

This comment has been minimized.

Copy link
Member Author

commented May 9, 2019

Another question is whether we want to refractor the region origin enum in this way, although it'd probably involve adding dummy spans for whichever variants currently don't have them.

@nikomatsakis
Copy link
Contributor

left a comment

seems good to me -- I prefer this to a pair

@varkor varkor force-pushed the varkor:TypeVariableOrigin-refactor branch from b213790 to 1ca3e34 May 31, 2019

@varkor

This comment has been minimized.

Copy link
Member Author

commented May 31, 2019

@eddyb: I've refactored ConstVariableOrigin as well. The remaining question is whether RegionVariableOrigin should be similarly refactored.

@varkor varkor force-pushed the varkor:TypeVariableOrigin-refactor branch from b819f8a to 9a6da07 May 31, 2019

@eddyb

eddyb approved these changes Jun 5, 2019

@eddyb

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

📌 Commit 9a6da07 has been approved by eddyb

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

⌛️ Testing commit 9a6da07 with merge 0437440...

bors added a commit that referenced this pull request Jun 5, 2019

Auto merge of #59331 - varkor:TypeVariableOrigin-refactor, r=eddyb
Refactor `TypeVariableOrigin`

Removes some unused variants and extracts the common `Span` field.

As suggested in #59008 (comment).

r? @eddyb
@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

💔 Test failed - checks-travis

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jun 5, 2019

The job armhf-gnu 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:07:38]    Compiling syntax_ext v0.0.0 (/checkout/src/libsyntax_ext)
[00:07:41] error[E0433]: failed to resolve: use of undeclared type or module `TypeVariableOrigin`
[00:07:41]    --> src/librustc/infer/error_reporting/need_type_info.rs:125:24
[00:07:41]     |
[00:07:41] 125 |                 if let TypeVariableOrigin::TypeParameterDefinition(_, name) =
[00:07:41]     |                        ^^^^^^^^^^^^^^^^^^ use of undeclared type or module `TypeVariableOrigin`
[00:08:07] [RUSTC-TIMING] syntax_ext test:false 28.771
[00:08:11] error: aborting due to previous error
[00:08:11] 
[00:08:11] For more information about this error, try `rustc --explain E0433`.
---
travis_time:end:1f58dc20:start=1559738752451478294,finish=1559738752460398688,duration=8920394
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0267cdd2
$ 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:178392a8
travis_time:start:178392a8
$ 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:0d225eb7
$ 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)

@varkor varkor force-pushed the varkor:TypeVariableOrigin-refactor branch from 9a6da07 to 8577bb4 Jun 5, 2019

@varkor

This comment has been minimized.

Copy link
Member Author

commented Jun 5, 2019

@bors r=eddyb

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

📌 Commit 8577bb4 has been approved by eddyb

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

commented Jun 5, 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:1d86d3d8:start=1559749900239036286,finish=1559749902583712557,duration=2344676271
$ 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
---
[00:08:58]    Compiling syntax_ext v0.0.0 (/checkout/src/libsyntax_ext)
[00:09:01] error[E0433]: failed to resolve: use of undeclared type or module `TypeVariableOrigin`
[00:09:01]    --> src/librustc/infer/error_reporting/need_type_info.rs:125:24
[00:09:01]     |
[00:09:01] 125 |                 if let TypeVariableOrigin::TypeParameterDefinition(_, name) =
[00:09:01]     |                        ^^^^^^^^^^^^^^^^^^ use of undeclared type or module `TypeVariableOrigin`
[00:09:31] error: aborting due to previous error
[00:09:31] 
[00:09:31] For more information about this error, try `rustc --explain E0433`.
[00:09:31] error: Could not compile `rustc`.
---
travis_time:end:16fce8ca:start=1559750486664363530,finish=1559750486668667225,duration=4303695
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:24459b44
$ 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:001b2fac
travis_time:start:001b2fac
$ 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:0415a42e
$ 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)

@varkor

This comment has been minimized.

Copy link
Member Author

commented Jun 5, 2019

@bors r=eddyb

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

📌 Commit 66b840c has been approved by eddyb

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

⌛️ Testing commit 66b840c with merge 0a8de47...

bors added a commit that referenced this pull request Jun 5, 2019

Auto merge of #59331 - varkor:TypeVariableOrigin-refactor, r=eddyb
Refactor `TypeVariableOrigin`

Removes some unused variants and extracts the common `Span` field.

As suggested in #59008 (comment).

r? @eddyb

Centril added a commit to Centril/rust that referenced this pull request Jun 5, 2019

Rollup merge of rust-lang#59331 - varkor:TypeVariableOrigin-refactor,…
… r=eddyb

Refactor `TypeVariableOrigin`

Removes some unused variants and extracts the common `Span` field.

As suggested in rust-lang#59008 (comment).

r? @eddyb

@Centril Centril referenced this pull request Jun 5, 2019

Closed

Rollup of 2 pull requests #61565

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

💔 Test failed - checks-travis

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jun 5, 2019

The job test-various 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.
[01:46:03] test time::tests::system_time_elapsed ... ok
[01:46:03] test time::tests::system_time_math ... ok
[01:46:04] test thread::tests::test_park_timeout_unpark_called_other_thread ... ok
[01:46:11] test sync::mpsc::tests::stress_recv_timeout_two_threads ... ok
[01:47:01] test process::tests::uid_works ... test process::tests::uid_works has been running for over 60 seconds
No output has been received in the last 30m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated

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)

@Centril

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

@bors retry

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2019

⌛️ Testing commit 66b840c with merge 1bec46c...

bors added a commit that referenced this pull request Jun 6, 2019

Auto merge of #59331 - varkor:TypeVariableOrigin-refactor, r=eddyb
Refactor `TypeVariableOrigin`

Removes some unused variants and extracts the common `Span` field.

As suggested in #59008 (comment).

r? @eddyb
@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: eddyb
Pushing 1bec46c to master...

@bors bors added the merged-by-bors label Jun 6, 2019

@bors bors merged commit 66b840c into rust-lang:master Jun 6, 2019

2 checks passed

Travis CI - Pull Request Build Passed
Details
homu Test successful
Details

@varkor varkor deleted the varkor:TypeVariableOrigin-refactor branch Jun 6, 2019

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.