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

remove unnecessary tasks #41063

Merged
merged 6 commits into from
Apr 12, 2017

Conversation

nikomatsakis
Copy link
Contributor

Remove various unnecessary tasks. All of these are "always execute" tasks that don't do any writes to tracked state (or else an assert would trigger, anyhow). In some cases, they issue lints or errors, but we''ll deal with that -- and anyway side-effects outside of a task don't cause problems for anything that I can see.

The one non-trivial refactoring here is the borrowck conversion, which adds the requirement to go from a DefId to a BodyId. I tried to make a useful helper here.

r? @eddyb

cc #40746
cc @cramertj @michaelwoerister

@nikomatsakis nikomatsakis changed the title remove unnecessarys remove unnecessary tasks Apr 4, 2017

pub fn provide(providers: &mut Providers) {
*providers = Providers {
borrowck: borrowck,
Copy link
Member

Choose a reason for hiding this comment

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

This should be borrowck, (otherwise there's no point in using this style and you can just assign to providers.borrowck).

@@ -51,4 +51,6 @@ mod borrowck;

pub mod graphviz;

pub use borrowck::provide;
Copy link
Member

Choose a reason for hiding this comment

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

The nesting of borrowck still bugs me, heh.

@@ -887,6 +887,7 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(sess: &'tcx Session,
let mut local_providers = ty::maps::Providers::default();
mir::provide(&mut local_providers);
rustc_privacy::provide(&mut local_providers);
borrowck::provide(&mut local_providers);
Copy link
Member

Choose a reason for hiding this comment

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

Note to self: make a macro to clean this up.

Copy link
Member

@eddyb eddyb left a comment

Choose a reason for hiding this comment

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

r=me with nits fixed (if wanted)

@nikomatsakis
Copy link
Contributor Author

@bors r=eddyb

@bors
Copy link
Contributor

bors commented Apr 12, 2017

📌 Commit 2e327a6 has been approved by eddyb

@bors
Copy link
Contributor

bors commented Apr 12, 2017

⌛ Testing commit 2e327a6 with merge d17e83a...

TimNN added a commit to TimNN/rust that referenced this pull request Apr 12, 2017
…c-loops, r=eddyb

remove unnecessary tasks

Remove various unnecessary tasks. All of these are "always execute" tasks that don't do any writes to tracked state (or else an assert would trigger, anyhow). In some cases, they issue lints or errors, but we''ll deal with that -- and anyway side-effects outside of a task don't cause problems for anything that I can see.

The one non-trivial refactoring here is the borrowck conversion, which adds the requirement to go from a `DefId` to a `BodyId`. I tried to make a useful helper here.

r? @eddyb

cc rust-lang#40746
cc @cramertj @michaelwoerister
@bors
Copy link
Contributor

bors commented Apr 12, 2017

💔 Test failed - status-travis

bors added a commit that referenced this pull request Apr 12, 2017
Rollup of 9 pull requests

- Successful merges: #41063, #41087, #41141, #41166, #41183, #41205, #41206, #41232, #41243
- Failed merges:
@TimNN
Copy link
Contributor

TimNN commented Apr 12, 2017

@bors bors merged commit 2e327a6 into rust-lang:master Apr 12, 2017
@nikomatsakis nikomatsakis deleted the issue-40746-always-exec-loops branch April 14, 2017 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants