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.
This API is completely unstable and subject to change.
- Simple file-locking apis for each OS.
- An immutable, owned value (except for interior mutability).
- hashes 🔒rustc encodes a lot of hashes. If hashes are stored as
derive(Encodable)will apply varint encoding to the hashes, which is less efficient than directly encoding the 8 or 16 bytes of the hash.
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).
- Rust Compiler Self-Profiling
- This is a copy of
core::hash::sipadapted to providing 128 bit hashes.
- 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.
- Calculation and management of a Strict Version Hash for crates
- This module defines various operations and types that are implemented in one way for the serial compiler, and another way the parallel compiler.
- This module implements tagged pointers.
- A singly-linked list.
- Module which contains the snapshot/rollback functionality of the
- Union-find implementation. The main type is
- 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.
Tagfor a given type.
- Type size assertion. The first argument is a type and the second argument is its expected size.
- This is essentially an
AtomicPtrbut is guaranteed to always be valid
- Returns a structure that calls
- Turns a closure that takes an
&mut Formatterinto something that can be display-formatted.
- This calls the passed function while ensuring it won’t be inlined into the caller.