- A folding traversal mechanism for complex data structures that contain type information.
- macros 🔒
- This module contains implementations of the
TypeVisitabletraits for various types in the Rust compiler. Most are written by hand, though we’ve recently added some macros and proc-macros to help with the tedium.
- A visiting traversal mechanism for complex data structures that contain type information.
- A De Bruijn index is a standard means of representing regions (and perhaps later types) in a higher-ranked setting. In particular, imagine a type like this:
- A floating-point (
f64) type variable ID.
- An integral (
usize, etc.) type variable ID.
- A type variable ID.
- Flags that we track on types. These flags are propagated upwards through the type during type construction, so that we can quickly check whether the type has various kinds of types in it without recursing over the type itself.
- “Universes” are used during type- and trait-checking in the presence of
for<..>binders to control what sets of names are visible. Universes are arranged into a tree: the root universe contains names that are always visible. Each child then adds a new set of names that are visible, in addition to those of its parent. We say that the child universe “extends” the parent universe with new names.
- A placeholder for a type that hasn’t been inferred yet.
- Imagine you have a function
F: FnOnce(&[T]) -> R, plus an iterator
Titems. You could combine them with
f(&iter.collect::<Vec<_>>()), but this requires allocating memory for the
- Needed so we can use #[derive(HashStable_Generic)]