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

Use bound types in librustc_traits #55649

Merged
merged 9 commits into from
Nov 13, 2018
Merged

Conversation

scalexm
Copy link
Member

@scalexm scalexm commented Nov 3, 2018

r? @nikomatsakis
see the tests which now move the higher-ranked binders to the left in implied bound rules!

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 3, 2018
@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.
travis_time:end:15f77c2e:start=1541261676620823550,finish=1541261678798888953,duration=2178065403
$ 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-5.0
---
[00:53:10] .................................................................................................... 4400/4984
[00:53:13] .................................................................................................... 4500/4984
[00:53:17] .......................................................i............................................ 4600/4984
[00:53:21] .................................................................................................... 4700/4984
user-annotations/dump-fn-method.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/user-annotations/dump-fn-method/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zverbose" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/user-annotations/dump-fn-method/auxiliary" "-A" "unused"
[00:53:28] ------------------------------------------
[00:53:28] 
[00:53:28] ------------------------------------------
[00:53:28] stderr:
[00:53:28] stderr:
[00:53:28] ------------------------------------------
[00:53:28] {"message":"user substs: Canonical { max_universe: U0, variables: [], value: UserSubsts { substs: [u32], user_self_ty: None } }","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/dump-fn-method.rs","byte_start":975,"byte_end":985,"line_start":36,"line_end":36,"column_start":13,"column_end":23,"is_primary":true,"text":[{"text":"    let x = foo::<u32>; //~ ERROR [u32]","highlight_start":13,"highlight_end":23}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: user substs: Canonical { max_universe: U0, variables: [], value: UserSubsts { substs: [u32], user_self_ty: None } }\n  --> /checkout/src/test/ui/nll/user-annotations/dump-fn-method.rs:36:13\n   |\nLL |     let x = foo::<u32>; //~ ERROR [u32]\n   |             ^^^^^^^^^^\n\n"}
[00:53:28] {"message":"user substs: Canonical { max_universe: U0, variables: [Canon

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

bors commented Nov 11, 2018

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

@@ -179,6 +179,30 @@ impl<'a, 'gcx, 'tcx> Substs<'tcx> {
})
}

pub fn bound_vars_for_item(
Copy link
Contributor

Choose a reason for hiding this comment

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

It'd be nice to have a comment here.


Returns a substitution vector containing "identity references" suitable for converting from the compiler's parameter representation to the bound type representation used in Chalk. The Nth parameter is substituted to a bound variable of index N, pointing at the innermost binder.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see you added this later :)

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Nov 12, 2018

📌 Commit 40208abdaae08e7c3ab89a167f086039ca9f6285 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 Nov 12, 2018
@bors
Copy link
Contributor

bors commented Nov 13, 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 chalk-bound-ty (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 chalk-bound-ty --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
warning: Cannot merge binary files: src/Cargo.lock (HEAD vs. heads/homu-tmp)
Auto-merging src/librustdoc/clean/mod.rs
Auto-merging src/librustc_typeck/collect.rs
Auto-merging src/librustc_typeck/check/mod.rs
Auto-merging src/librustc_traits/chalk_context/mod.rs
Auto-merging src/librustc_mir/borrow_check/nll/type_check/mod.rs
Auto-merging src/Cargo.lock
CONFLICT (content): Merge conflict in src/Cargo.lock
Automatic merge failed; fix conflicts and then commit the result.

@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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 13, 2018
@scalexm
Copy link
Member Author

scalexm commented Nov 13, 2018

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Nov 13, 2018

📌 Commit 8d0b969 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 13, 2018
@bors
Copy link
Contributor

bors commented Nov 13, 2018

⌛ Testing commit 8d0b969 with merge 5c9f7dc...

bors added a commit that referenced this pull request Nov 13, 2018
Use bound types in `librustc_traits`

r? @nikomatsakis
see the tests which now move the higher-ranked binders to the left in implied bound rules!
@bors
Copy link
Contributor

bors commented Nov 13, 2018

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

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.

4 participants