[−][src]Crate rustc
⚙️ This is an internal compiler API. (rustc_private)
This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.
The "main crate" of the Rust compiler. This crate contains common type definitions that are used by the other crates in the rustc "family". Some prominent examples (note that each of these modules has their own README with further details).
- HIR. The "high-level (H) intermediate representation (IR)" is
defined in the
hirmodule. - MIR. The "mid-level (M) intermediate representation (IR)" is
defined in the
mirmodule. This module contains only the definition of the MIR; the passes that transform and operate on MIR are found inlibrustc_mircrate. - Types. The internal representation of types used in rustc is
defined in the
tymodule. This includes the type context (ortcx), which is the central context during most of compilation, containing the interners and other things. - Traits. Trait resolution is implemented in the
traitsmodule. - Type inference. The type inference code can be found in the
infermodule; this code handles low-level equality and subtyping operations. The type check pass in the compiler is found in thelibrustc_typeckcrate.
For more information about how rustc works, see the rustc guide.
Note
This API is completely unstable and subject to change.
Modules
| cfg | Internal Module that constructs a control-flow graph representing an item.
Uses |
| dep_graph | Internal |
| diagnostics | Internal |
| hir | Internal |
| ich | Internal ICH - Incremental Compilation Hash |
| infer | Internal See the Book for more information. |
| lint | Internal Lints, aka compiler warnings. |
| macros | Internal |
| middle | Internal |
| mir | Internal MIR datatypes and passes. See the rustc guide for more info. |
| query | Internal |
| session | Internal |
| traits | Internal Trait Resolution. See the rustc guide for more information on how this works. |
| ty | Internal |
| util | Internal |
Macros
| BraceStructLiftImpl | Internal |
| BraceStructTypeFoldableImpl | Internal |
| CloneLiftImpls | Internal |
| CloneTypeFoldableAndLiftImpls | Internal |
| CloneTypeFoldableImpls | Internal Used for types that are |
| EnumLiftImpl | Internal |
| EnumTypeFoldableImpl | Internal |
| TupleStructTypeFoldableImpl | Internal |
| __impl_decoder_methods | Internal |
| __impl_stable_hash_field | Internal |
| bug | Internal |
| declare_combined_early_lint_pass | Internal |
| declare_combined_late_lint_pass | Internal |
| declare_lint | Internal Declares a static item of type |
| declare_lint_pass | Internal Declares a type named |
| declare_tool_lint | Internal |
| early_lint_methods | Internal |
| err | Internal |
| expand_combined_early_lint_pass_method | Internal |
| expand_combined_early_lint_pass_methods | Internal |
| expand_combined_late_lint_pass_method | Internal |
| expand_combined_late_lint_pass_methods | Internal |
| impl_lint_pass | Internal Implements |
| impl_stable_hash_for | Internal |
| impl_stable_hash_for_spanned | Internal |
| implement_ty_decoder | Internal |
| late_lint_methods | Internal |
| lint_array | Internal Declares a static |
| span_bug | Internal |
Constants
| DIAGNOSTICS | Internal |