Expand description
Various data structures used by the Rust compiler. The intention is that code in here should not be specific to rustc, so that it can be easily unit tested and so forth.
§Note
This API is completely unstable and subject to change.
Re-exports§
Modules§
- aligned
- atomic_ref 🔒
- base_n
- Converts unsigned integers into a string representation with some base. Bases up to and including 36 can be used for case-insensitive things.
- binary_search_ util 
- fingerprint
- flat_map_ in_ place 
- flock
- Simple file-locking apis for each OS.
- frozen
- An immutable, owned value (except for interior mutability).
- fx
- graph
- intern
- jobserver
- marker
- memmap
- obligation_forest 
- The ObligationForestis a utility data structure used in trait matching to track the set of outstanding obligations (those not yet resolved to success or error). It also tracks the “backtrace” of each pending obligation (why we are trying to figure this out in the first place).
- owned_slice 
- packed
- profiling
- Rust Compiler Self-Profiling
- sharded
- small_c_ str 
- snapshot_map 
- snapshot_vec 
- A utility class for implementing “snapshottable” things; a snapshottable data structure permits
you to take a snapshot (via start_snapshot) and then, after making some changes, elect either to rollback to the start of the snapshot or commit those changes.
- sorted_map 
- sso
- stable_hasher 
- stack
- steal
- svh
- Calculation and management of a Strict Version Hash for crates
- sync
- This module defines various operations and types that are implemented in one way for the serial compiler, and another way the parallel compiler.
- tagged_ptr 
- This module implements tagged pointers. In order to utilize the pointer
packing, you must have a tag type implementing the Tagtrait.
- temp_dir 
- thinvec
- This is a copy-paste of Vec::extract_ifforThinVec.
- thousands
- This is a bare-bones alternative to the thousandscrate on crates.io, for printing large numbers in a readable fashion.
- transitive_relation 
- undo_log 
- Module which contains the snapshot/rollback functionality of the enadata structures.
- unhash
- unify
- Union-find implementation. The main type is UnificationTable.
- union_find 
- unord
- This module contains collection types that don’t expose their internal ordering. This is a useful property for deterministic computations, such as required by the query system.
- vec_cache 
- VecCache maintains a mapping from K -> (V, I) pairing. K and I must be roughly u32-sized, and V must be Copy.
- work_queue 
Macros§
- define_id_ collections 
- define_stable_ id_ collections 
- external_bitflags_ debug 
- parallel
- Runs a list of blocks in parallel. The first block is executed immediately on the current thread. Use that for the longest running block.
- static_assert_ size 
- Type size assertion. The first argument is a type and the second argument is its expected size.
Structs§
- AtomicRef 
- This is essentially an AtomicPtrbut is guaranteed to always be valid
- FatalError Marker 
- This is a marker for a fatal compiler error used with resume_unwind.
- OnDrop
Functions§
- defer
- Returns a structure that calls fwhen dropped.
- make_display 
- Turns a closure that takes an &mut Formatterinto something that can be display-formatted.
- outline
- This calls the passed function while ensuring it won’t be inlined into the caller.