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

rustc: use methods instead of functions in middle::ty. #26575

Merged
merged 6 commits into from Jun 27, 2015

Conversation

Projects
None yet
7 participants
@eddyb
Copy link
Member

eddyb commented Jun 25, 2015

Next step towards split local/global type contexts, after #26351.
cc @rust-lang/compiler @jroesch

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jun 25, 2015

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@barosl

This comment has been minimized.

Copy link
Contributor

barosl commented Jun 25, 2015

O.o This is a HUGE refactoring! 👏 👍 🍰

I also wonder how many PRs will be marked as unmergeable because of this... 😆

@eddyb

This comment has been minimized.

Copy link
Member Author

eddyb commented Jun 25, 2015

@barosl it's a... prerequisite for a prerequisite (TyCx<'a, 'tcx>) for split local/global type contexts.
I'm a bit worried that it doesn't help as much as I had hoped or that it will be controversial.

It's also going to rot if it doesn't get reviewed this week, but most changes were mechanical, so unless there are significant changes to middle::ty, it should be possible to rebase it manually.

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jun 26, 2015

r? @nrc (or other @rust-lang/compiler folks)

@rust-highfive rust-highfive assigned nrc and unassigned alexcrichton Jun 26, 2015

@nrc

This comment has been minimized.

Copy link
Member

nrc commented Jun 26, 2015

@rust-highfive rust-highfive assigned nikomatsakis and unassigned nrc Jun 26, 2015

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 26, 2015

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

@eddyb eddyb force-pushed the eddyb:tycx branch from 73cd114 to 75e1de9 Jun 26, 2015

@eddyb eddyb changed the title rustc: use methods instead of functions in middle::ty. rustc: use methods instead of middle::ty functions and alias &'a ctxt<'tcx> to TyCx<'a, 'tcx>. Jun 26, 2015

@eddyb eddyb force-pushed the eddyb:tycx branch from 75e1de9 to 0ca3721 Jun 26, 2015

@eddyb eddyb force-pushed the eddyb:tycx branch from 0ca3721 to a57c5ec Jun 26, 2015

@eddyb eddyb changed the title rustc: use methods instead of middle::ty functions and alias &'a ctxt<'tcx> to TyCx<'a, 'tcx>. rustc: use only methods in middle::ty and replace &'a ctxt<'tcx> with TyCx<'a, 'tcx>. Jun 26, 2015

@eddyb

This comment has been minimized.

Copy link
Member Author

eddyb commented Jun 26, 2015

I might remove the last two commits - if we can get something like '_ working (to replace &ty::ctxt<'tcx> with TyCx<'_, 'tcx>), even if it's feature-gated, the existing TyCx commits would be obsoleted (and merging them would make it harder to switch to '_ later).
Also see https://internals.rust-lang.org/t/flattening-the-contexts-for-fun-and-profit/2293.

@eddyb eddyb force-pushed the eddyb:tycx branch from 8f070a7 to ad66c21 Jun 26, 2015

@eddyb eddyb changed the title rustc: use only methods in middle::ty and replace &'a ctxt<'tcx> with TyCx<'a, 'tcx>. rustc: use methods instead of functions in middle::ty. Jun 26, 2015

@eddyb

This comment has been minimized.

Copy link
Member Author

eddyb commented Jun 26, 2015

@nikomatsakis I've removed the TyCx commits from this PR - they are now at https://github.com/eddyb/rust/commits/tycx-more-tcx-tcx.
If #26598 is merged, introducing TyCx will be way less painful (though it does mean a couple of days were wasted) - also see rust-lang/rfcs#1177.

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jun 27, 2015

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 27, 2015

📌 Commit ad66c21 has been approved by nikomatsakis

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jun 27, 2015

@eddyb this is nice!

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 27, 2015

⌛️ Testing commit ad66c21 with merge 650566e...

bors added a commit that referenced this pull request Jun 27, 2015

Auto merge of #26575 - eddyb:tycx, r=nikomatsakis
Next step towards split local/global type contexts, after #26351.
cc @rust-lang/compiler @jroesch

@bors bors merged commit ad66c21 into rust-lang:master Jun 27, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@eddyb eddyb deleted the eddyb:tycx branch Jun 27, 2015

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.