Re-exportsΒ§
use rustc_data_structures::fx::FxIndexMap;πuse rustc_data_structures::fx::FxIndexSet;πuse rustc_hir as hir;πuse rustc_infer::traits::util;πuse rustc_middle::ty;πuse rustc_middle::ty::GenericArgs;πuse rustc_middle::ty::PredicateProxy;πuse rustc_middle::ty::Ty;πuse rustc_middle::ty::TyCtxt;πuse rustc_middle::ty::TypeFoldable;πuse rustc_middle::ty::TypeFolder;πuse rustc_middle::ty::TypeSuperFoldable;πuse rustc_middle::ty::TypeVisitableExt;πuse rustc_middle::ty::Upcast;πuse rustc_middle::ty::shift_vars;πuse rustc_span::def_id::DefId;πuse rustc_span::def_id::LocalDefId;πuse rustc_span::Span;πuse rustc_span::bug;πuse rustc_span::span_bug;πuse tracing::debug;πuse tracing::instrument;πuse tracing::instrument;πuse super::ItemCtxt;πuse super::clauses_of::assert_only_contains_clauses_from;πuse crate::hir_ty_lowering::HirTyLowerer;πuse crate::hir_ty_lowering::ImpliedBoundsContext;πuse crate::hir_ty_lowering::OverlappingAsssocItemConstraints;πuse crate::hir_ty_lowering::PredicateFilter;π
StructsΒ§
- Assoc
TyTo πOpaque - MapAnd
Compress πBound Vars - Given some where clause like
for<'b, 'c> <Self as Trait<'a_identity>>::Gat<'b>: Bound<'c>, the mapping will map'bback to the GATβs'b_identity. Then we need to compress the remaining bound var'cto index 0.
FunctionsΒ§
- associated_
type_ πbounds - For associated types we include both bounds written on the type
(
type X: Trait) and predicates from the trait:where Self::X: Trait. - explicit_
item_ πbounds - explicit_
item_ πbounds_ with_ filter - explicit_
item_ πself_ bounds - impl_
super_ πoutlives - This exists as an optimization to compute only the supertraits of this implβs trait that are outlives bounds.
- item_
bounds π - item_
non_ πself_ bounds - This exists as an optimization to compute only the item bounds of the item
that are not
Selfbounds. - item_
self_ πbounds - opaque_
type_ πbounds - Opaque types donβt inherit bounds from their parent: for return position impl trait it isnβt possible to write a suitable predicate on the containing function and for type-alias impl trait we donβt have a backwards compatibility issue.
- remap_
gat_ πvars_ and_ recurse_ into_ nested_ projections - The code below is quite involved, so let me explain.