Expand description
Helper code for building a linked list of user-type projections on the stack while visiting a THIR pattern.
This avoids having to repeatedly clone a partly-built UserTypeProjections
at every step of the traversal, which is what the previous code was doing.
Re-exportsΒ§
use std::assert_matches;πuse std::iter;πuse rustc_abi::FieldIdx;πuse rustc_abi::VariantIdx;πuse rustc_data_structures::smallvec::SmallVec;πuse rustc_middle::mir::ProjectionElem;πuse rustc_middle::mir::UserTypeProjection;πuse rustc_middle::mir::UserTypeProjections;πuse rustc_middle::ty::AdtDef;πuse rustc_middle::ty::UserTypeAnnotationIndex;πuse rustc_span::Symbol;π
EnumsΒ§
- Projected
User πTypes Node - Projected
User πTypes Op - One of a list of βoperationsβ that can be used to lazily build projections of user-specified types.
Type AliasesΒ§
- User
Type πIndices - A single
thir::Patnode should almost never have more than 0-2 user types. We can store up to 4 inline in the same size as an ordinaryVec.