Skip to content

Extract rustc_hir out of rustc - #67803

Merged
bors merged 20 commits into
rust-lang:masterfrom
Centril:librustc_hir
Jan 5, 2020
Merged

Extract rustc_hir out of rustc#67803
bors merged 20 commits into
rust-lang:masterfrom
Centril:librustc_hir

Conversation

@Centril

@CentrilCentril commented Jan 2, 2020

Copy link
Copy Markdown
Contributor

The new crate contains:

pubmod def;pubmod def_id;mod hir;pubmod hir_id;pubmod itemlikevisit;pubmod pat_util;pubmod print;mod stable_hash_impls;pubuse hir::*;pubuse hir_id::*;pubuse stable_hash_impls::HashStableContext;

Remains to be done in follow-up PRs:

cc #65031

r? @Zoxc

@rust-highfive

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@CentrilCentril added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 2, 2020
@bors

This comment has been minimized.

Comment threadsrc/librustc/query/mod.rs Outdated
Comment threadsrc/librustc/ich/impls_syntax.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it would be better to have a is_ignored_attr method on syntax::HashStableContext and move the impl to syntax.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

This doesn't work out well unfortunately. I'm only able to move one of the impls, but not the impl<AstCtx: crate::HashStableContext> HashStable<AstCtx> for [ast::Attribute] { one because it becomes orphaned (including with specialization). So I would prefer to have those impls in one place and this file is the only way to do that I think.

Comment threadsrc/librustc/ich/impls_hir.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You could add with_node_id_hashing_mode and while_hashing_hir_bodies to rustc_hir::HashStableContext then you wouldn't need to keep all the impls here.

@Zoxc

Zoxc commented Jan 4, 2020

Copy link
Copy Markdown
Contributor

@bors r+ p=5 rollup=never

@bors

bors commented Jan 4, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit cdf32e1 has been approved by Zoxc

@borsbors 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 Jan 4, 2020
@bors

bors commented Jan 4, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit cdf32e1 with merge 7494250...

bors added a commit that referenced this pull request Jan 4, 2020
Extract `rustc_hir` out of `rustc`
The new crate contains:
```rust
pub mod def;
pub mod def_id;
mod hir;
pub mod hir_id;
pub mod itemlikevisit;
pub mod pat_util;
pub mod print;
mod stable_hash_impls;
pub use hir::*;
pub use hir_id::*;
pub use stable_hash_impls::HashStableContext;
```
Remains to be done in follow-up PRs:
- Move `rustc::hir::map` into `rustc_hir_map` -- this has to be a separate crate due to the `dep_graph` (blocked on #67761).
- Move references to `rustc::hir` to `rustc_hir` where possible.
cc #65031
r? @Zoxc
@bors

bors commented Jan 5, 2020

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-azure
Approved by: Zoxc
Pushing 7494250 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Jan 5, 2020
@bors
bors merged commit cdf32e1 into rust-lang:masterJan 5, 2020
@Centril
Centril deleted the librustc_hir branch January 5, 2020 01:19
JohnTitor added a commit to JohnTitor/rust-clippy that referenced this pull request Jan 5, 2020
matthiaskrgr added a commit to matthiaskrgr/rust-clippy that referenced this pull request Jan 5, 2020
JohnTitor added a commit to JohnTitor/rust-clippy that referenced this pull request Jan 5, 2020
bors added a commit to rust-lang/rust-clippy that referenced this pull request Jan 5, 2020
bors added a commit to rust-lang/rust-clippy that referenced this pull request Jan 5, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: 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

@Centril@rust-highfive@bors@Zoxc