Skip to main content

PolyTraitDeclRef

Type Alias PolyTraitDeclRef 

Source
pub type PolyTraitDeclRef = RegionBinder<TraitDeclRef>;
Expand description

A quantified trait predicate, e.g. for<'a> Type<'a>: Trait<'a, Args>.

Aliased Type§

pub struct PolyTraitDeclRef {
    pub regions: IndexVec<RegionId, RegionParam>,
    pub skip_binder: TraitDeclRef,
}

Fields§

§regions: IndexVec<RegionId, RegionParam>§skip_binder: TraitDeclRef

Named this way to highlight accesses to the inner value that might be handling parameters incorrectly. Prefer using helper methods.

Implementations§

Source§

impl PolyTraitDeclRef

Source

fn fmt_trait_proof<'a, C: AstFormatter + 'a>( &'a self, id: TraitClauseId, value: Option<&'a TraitRef>, ctx: &'a C, ) -> impl Display + 'a

Source

fn format_as_pred<'a, C: AstFormatter + 'a>( &'a self, ctx: &'a C, ) -> impl Display + 'a

Trait Implementations§

Source§

impl<C: AstFormatter> FmtWithCtx<C> for PolyTraitDeclRef

Source§

fn fmt_with_ctx(&self, ctx: &C, f: &mut Formatter<'_>) -> Result

Source§

fn with_ctx<'a>(&'a self, ctx: &'a C) -> WithCtx<'a, C, Self>

Returns a struct that implements Display. This allows the following: Read more
Source§

fn to_string_with_ctx(&self, ctx: &C) -> String