Extract rustc_hir out of rustc#67803
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
src/librustc/ich/impls_syntax.rs
Outdated
There was a problem hiding this comment.
I think it would be better to have a is_ignored_attr method on syntax::HashStableContext and move the impl to syntax.
There was a problem hiding this comment.
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.
src/librustc/ich/impls_hir.rs
Outdated
There was a problem hiding this comment.
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.
Also fix fallout wrt. HashStable.
|
@bors r+ p=5 rollup=never |
|
📌 Commit cdf32e1 has been approved by |
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
|
☀️ Test successful - checks-azure |
Rustup to rust-lang/rust#67803 and rust-lang/rust#67137 changelog: none
Rustup to rust-lang/rust#67803 and rust-lang/rust#67137 changelog: none
The new crate contains:
Remains to be done in follow-up PRs:
Move
rustc::hir::mapintorustc_hir_map-- this has to be a separate crate due to thedep_graph(blocked on Move the dep_graph construction to a dedicated crate. #67761).Move references to
rustc::hirtorustc_hirwhere possible.cc #65031
r? @Zoxc