Crate rustc_data_structures[][src]

Various data structures used by the Rust compiler. The intention is that code in here should be 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.

Modules

array_vec

A stack-allocated vector, allowing storage of N elements on the stack.

base_n
bitslice
bitvec
const_cstr
fingerprint
flock

Simple file-locking apis for each OS.

fx
graph
indexed_set
indexed_vec
obligation_forest

The ObligationForest is 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). See README.md for a general overview of how to use this class.

owning_ref

An owning reference.

ptr_key
sip128

This is a copy of core::hash::sip adapted to providing 128 bit hashes.

small_c_str
small_vec

A vector type intended to be used for small vectors.

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
stable_hasher
svh

Calculation and management of a Strict Version Hash for crates

sync

This module defines types which are thread safe if cfg!(parallel_queries) is true.

thin_vec
tiny_list

A singly-linked list.

transitive_relation
tuple_slice
unify

Union-find implementation. The main type is UnificationTable.

vec_linked_list
work_queue

Macros

const_cstr

This macro creates a zero-overhead &CStr by adding a NUL terminator to the string literal passed into it at compile-time. Use it like:

impl_stable_hash_via_hash
newtype_index
rustc_erase_owner

Structs

OnDrop

Traits

ToHex

A trait for converting a value to hexadecimal encoding