Crate rustc[−][src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
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
hir
module. - MIR. The "mid-level (M) intermediate representation (IR)" is
defined in the
mir
module. This module contains only the definition of the MIR; the passes that transform and operate on MIR are found inlibrustc_mir
crate. - Types. The internal representation of types used in rustc is
defined in the
ty
module. 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
traits
module. - Type inference. The type inference code can be found in the
infer
module; this code handles low-level equality and subtyping operations. The type check pass in the compiler is found in thelibrustc_typeck
crate.
For more information about how rustc works, see the rustc guide.
Note
This API is completely unstable and subject to change.
Re-exports
extern crate std; |
extern crate arena; |
extern crate bitflags; |
extern crate core; |
extern crate fmt_macros; |
extern crate getopts; |
extern crate graphviz; |
extern crate lazy_static; |
extern crate rustc_target; |
extern crate rustc_data_structures; |
extern crate serialize; |
extern crate rustc_errors as errors; |
extern crate log; |
extern crate syntax; |
extern crate syntax_pos; |
extern crate jobserver; |
extern crate proc_macro; |
extern crate serialize as rustc_serialize; |
extern crate rustc_apfloat; |
extern crate byteorder; |
extern crate backtrace; |
extern crate flate2; |
extern crate test; |
use std::prelude::v1::*; |
Modules
cfg |
[ Experimental ] Module that constructs a control-flow graph representing an item.
Uses |
dep_graph |
[ Experimental ]
|
diagnostics |
[ Experimental ]
|
hir |
[ Experimental ]
|
ich |
[ Experimental ] ICH - Incremental Compilation Hash |
infer |
[ Experimental ] See the Book for more information. |
lint |
[ Experimental ] Lints, aka compiler warnings. |
macros |
[ Experimental ]
|
middle |
[ Experimental ]
|
mir |
[ Experimental ] MIR datatypes and passes. See the rustc guide for more info. |
rustc |
[ Experimental ]
|
session |
[ Experimental ]
|
traits |
[ Experimental ] Trait Resolution. See rustc guide for more info on how this works. |
ty |
[ Experimental ]
|
util |
[ Experimental ]
|
Macros
BraceStructLiftImpl |
[ Experimental ]
|
BraceStructTypeFoldableImpl |
[ Experimental ]
|
CloneLiftImpls |
[ Experimental ]
|
CloneTypeFoldableAndLiftImpls |
[ Experimental ]
|
CloneTypeFoldableImpls |
[ Experimental ] Used for types that are |
EnumLiftImpl |
[ Experimental ]
|
EnumTypeFoldableImpl |
[ Experimental ]
|
TupleStructTypeFoldableImpl |
[ Experimental ]
|
__impl_decoder_methods |
[ Experimental ]
|
__impl_stable_hash_field |
[ Experimental ]
|
bug |
[ Experimental ]
|
declare_lint |
[ Experimental ] Declare a static item of type |
err |
[ Experimental ]
|
impl_stable_hash_for |
[ Experimental ]
|
impl_stable_hash_for_spanned |
[ Experimental ]
|
implement_ty_decoder |
[ Experimental ]
|
lint_array |
[ Experimental ] Declare a static |
span_bug |
[ Experimental ]
|
Constants
DIAGNOSTICS |
[ Experimental ]
|