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_metadata: Privatize private code and remove dead code #65170

Merged
merged 5 commits into from
Oct 15, 2019

Conversation

petrochenkov
Copy link
Contributor

@petrochenkov petrochenkov commented Oct 6, 2019

Also some minor cleanup and documentation improvements.

r? @eddyb

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 6, 2019
@JohnCSimon
Copy link
Member

JohnCSimon commented Oct 12, 2019

Ping from triage
@eddyb can you please review this PR?
@petrochenkov please fix the merge conflict.

thank you

@@ -1183,7 +1182,7 @@ impl<'a> Resolver<'a> {
vis: ty::Visibility::Public,
}),

crate_loader,
crate_loader: CrateLoader::new(session, cstore, crate_name),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't like this.
CrateLoader is an "immutable reference" to some fields in rustc_interface::Compiler plus the result of rustc_interface query crate_name().
(metadata_loader should also migrate from CStore to CrateLoader and it's also a kind of "immutable reference" to rustc_interface::Compiler.)
CrateLoader::new is called from multiple places right now, but it should always return the same thing.
I'll probably try to add a rustc_interface query for it.

I want to split the crate locator configuration (locator::Context) into three parts - immutable per-session configuration, immutable per-search configuration, and mutable output / in-progress state.
CrateLoader is supposed to be the "immutable per-session configuration" in this case, that's why I want to make sure that it's indeed the same all the time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've reverted this bit, CrateLoader is now constructed in the same place as before.
I'll try to do something with it later.

@petrochenkov
Copy link
Contributor Author

I've added a couple more commits.

cc @michaelwoerister, perhaps you can review this if @eddyb is unavailable?

@bors
Copy link
Contributor

bors commented Oct 14, 2019

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

@michaelwoerister
Copy link
Member

@petrochenkov I put it on my todo list.

@eddyb
Copy link
Member

eddyb commented Oct 14, 2019

Was there another PR with a similar title? For some reason I thought I reviewed this.

@petrochenkov
Copy link
Contributor Author

Yeah, probably the previous one - #65026.

@eddyb
Copy link
Member

eddyb commented Oct 14, 2019

r=me after rebase.

@petrochenkov
Copy link
Contributor Author

@bors r=eddyb

@bors
Copy link
Contributor

bors commented Oct 14, 2019

📌 Commit f5baad2 has been approved by eddyb

@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 Oct 14, 2019
@bors
Copy link
Contributor

bors commented Oct 14, 2019

⌛ Testing commit f5baad2 with merge db0b0c5143f9ccecc648b233f781e4c644678b28...

@rust-highfive
Copy link
Collaborator

Your PR failed (pretty log, 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.

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 Oct 14, 2019

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 14, 2019
@pietroalbini
Copy link
Member

@bors retry azure network error

@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 Oct 14, 2019
tmandry added a commit to tmandry/rust that referenced this pull request Oct 15, 2019
rustc_metadata: Privatize private code and remove dead code

Also some minor cleanup and documentation improvements.

r? @eddyb
@bors
Copy link
Contributor

bors commented Oct 15, 2019

⌛ Testing commit f5baad2 with merge 592927c191719918d0781e47e5355d7c538739a8...

@tmandry
Copy link
Member

tmandry commented Oct 15, 2019

@bors retry rolled up

bors added a commit that referenced this pull request Oct 15, 2019
Rollup of 10 pull requests

Successful merges:

 - #65170 (rustc_metadata: Privatize private code and remove dead code)
 - #65260 (Optimize `LexicalResolve::expansion`.)
 - #65261 (Remove `Option` from `TokenStream`)
 - #65332 (std::fmt: reorder docs)
 - #65340 (Several changes to the codegen backend organization)
 - #65365 (Include const generic arguments in metadata)
 - #65398 (Bring attention to suggestions when the only difference is capitalization)
 - #65410 (syntax: add parser recovery for intersection- / and-patterns `p1 @ p2`)
 - #65415 (Remove an outdated test output file)
 - #65416 (Minor sync changes)

Failed merges:

r? @ghost
@rust-highfive
Copy link
Collaborator

Your PR failed (pretty log, 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.

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 Oct 15, 2019

⌛ Testing commit f5baad2 with merge e369d87...

@bors bors merged commit f5baad2 into rust-lang:master Oct 15, 2019
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.

8 participants