Struct rustc_typeck::traits::TraitAliasExpander [−][src]
pub struct TraitAliasExpander<'tcx> {
tcx: TyCtxt<'tcx>,
stack: Vec<TraitAliasExpansionInfo<'tcx>, Global>,
}Expand description
“Trait alias expansion” is the process of expanding a sequence of trait
references into another sequence by transitively following all trait
aliases. e.g. If you have bounds like Foo + Send, a trait alias
trait Foo = Bar + Sync;, and another trait alias
trait Bar = Read + Write, then the bounds would expand to
Read + Write + Sync + Send.
Expansion is done via a DFS (depth-first search), and the visited field
is used to avoid cycles.
Fields
tcx: TyCtxt<'tcx>stack: Vec<TraitAliasExpansionInfo<'tcx>, Global>Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for TraitAliasExpander<'tcx>
impl<'tcx> !Send for TraitAliasExpander<'tcx>
impl<'tcx> !Sync for TraitAliasExpander<'tcx>
impl<'tcx> Unpin for TraitAliasExpander<'tcx>
impl<'tcx> !UnwindSafe for TraitAliasExpander<'tcx>
Blanket Implementations
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes