Skip to main content

Module canonical

Module canonical 

Source

Re-exportsΒ§

use std::fmt; πŸ”’
use std::ops::Index; πŸ”’
use arrayvec::ArrayVec; πŸ”’
use derive_where::derive_where; πŸ”’
use rustc_macros::Decodable_NoContext; πŸ”’
use rustc_macros::Encodable_NoContext; πŸ”’
use rustc_macros::StableHash_NoContext; πŸ”’
use rustc_type_ir_macros::GenericTypeVisitable; πŸ”’
use rustc_type_ir_macros::Lift_Generic; πŸ”’
use rustc_type_ir_macros::TypeFoldable_Generic; πŸ”’
use rustc_type_ir_macros::TypeVisitable_Generic; πŸ”’
use crate::data_structures::DelayedMap; πŸ”’
use crate::data_structures::HashMap; πŸ”’
use crate as ty; πŸ”’
use crate::Interner; πŸ”’
use crate::TypingModeEqWrapper; πŸ”’
use crate::UniverseIndex; πŸ”’
use crate::inherent::*; πŸ”’

StructsΒ§

Canonical
A β€œcanonicalized” type V is one where all free inference variables have been rewritten to β€œcanonical vars”. These are numbered starting from 0 in order of first appearance.
CanonicalParamEnvCache
CanonicalParamEnvCacheEntry
CanonicalQueryInput
CanonicalVarValues
A set of values corresponding to the canonical variables from some Canonical. You can give these values to canonical_value.instantiate to instantiate them into the canonical value at the right places.
Canonicalized
A projection of a Canonical<V>, as produced by Canonical::project. Useful as a marker when dealing with fields within a Canonical<V>, because it indicates that T may contain canonical bound variables that must be instantiated before use.
CanonicalizerState
State used and modified by a canonicalizer during canonicalization. To avoid many allocations, this state is reused by many canonicalizers from GlobalCaches.

EnumsΒ§

CanonicalVarKind
Information about a canonical variable that is included with the canonical value. This is sufficient information for code to create a copy of the canonical value in some other inference context, with fresh inference variables replacing the canonical values.