Skip to content

Explain difference between rustc_middle::{something} and rustc_{something} in rustc dev guide #2175

Open
@camelid

Description

@camelid

I think we are all agreed that splitting up rustc_middle would be a good idea
as it would reduce memory usage and increase parallelism when bootstrapping.
Ideally, we would split out each rustc_middle module into its own crate. For
example, rustc_middle::ich would become rustc_ich or something (I'm working
on this right now).

However, a lot of the rustc_middle modules already have crates named after
them:

rustc_middle module similarly-named crate
rustc_middle::arena rustc_arena
rustc_middle:hir rustc_hir
rustc_middle::infer rustc_infer
rustc_middle::lint rustc_lint
rustc_middle::macros rustc_macros
rustc_middle::mir rustc_mir
rustc_middle::query rustc_query_system
rustc_middle::traits rustc_traits
rustc_middle::ty rustc_ty

I believe for the case of rustc_middle::mir -> rustc_mir the difference is
that rustc_middle::mir contains the definition for the MIR and associated code
like the MIR visitors, while rustc_mir contains analysis code (e.g. borrowck),
but I don't know what the differences are for the others. Therefore, my goal
with this meta issue is to collect information about what the differences
are to make it easier to split up rustc_middle.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions