Trait flux_fhir_analysis::conv::ConvPhase

source ·
pub trait ConvPhase<'genv, 'tcx>: Sized {
    type Results: WfckResultsProvider;

    const EXPAND_TYPE_ALIASES: bool;
    const HAS_ELABORATED_INFORMATION: bool;

    // Required methods
    fn genv(&self) -> GlobalEnv<'genv, 'tcx>;
    fn owner(&self) -> FluxOwnerId;
    fn next_sort_vid(&mut self) -> SortVid;
    fn next_type_vid(&mut self) -> TyVid;
    fn next_region_vid(&mut self) -> RegionVid;
    fn next_const_vid(&mut self) -> ConstVid;
    fn results(&self) -> &Self::Results;
    fn insert_bty_sort(&mut self, fhir_id: FhirId, sort: Sort);
    fn insert_alias_reft_sort(&mut self, fhir_id: FhirId, fsort: FuncSort);

    // Provided methods
    fn into_conv_ctxt(self) -> ConvCtxt<Self> { ... }
    fn as_conv_ctxt(&mut self) -> &mut ConvCtxt<Self> { ... }
}
Expand description

We do conversion twice: once before sort checking when we don’t have elaborated information and then again after sort checking after all information has been elaborated. This is the interface to configure conversion for both phases.

Required Associated Types§

Required Associated Constants§

source

const EXPAND_TYPE_ALIASES: bool

Whether to expand type aliases or to generate a weak rty::AliasTy.

source

const HAS_ELABORATED_INFORMATION: bool

Whether we have elaborated information or not (in the first phase we will not, but in the second we will).

Required Methods§

source

fn genv(&self) -> GlobalEnv<'genv, 'tcx>

source

fn owner(&self) -> FluxOwnerId

source

fn next_sort_vid(&mut self) -> SortVid

source

fn next_type_vid(&mut self) -> TyVid

source

fn next_region_vid(&mut self) -> RegionVid

source

fn next_const_vid(&mut self) -> ConstVid

source

fn results(&self) -> &Self::Results

source

fn insert_bty_sort(&mut self, fhir_id: FhirId, sort: Sort)

Called after converting an indexed type b[e] with the fhir_id and sort of b. Used during the first phase to collect the sort of base types.

source

fn insert_alias_reft_sort(&mut self, fhir_id: FhirId, fsort: FuncSort)

Called after converting an fhir::ExprKind::Alias with the sort of the resulting rty::AliasReft. Used during the first phase to collect the sorts of refinement aliases.

Provided Methods§

source

fn into_conv_ctxt(self) -> ConvCtxt<Self>

source

fn as_conv_ctxt(&mut self) -> &mut ConvCtxt<Self>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'genv, 'tcx> ConvPhase<'genv, 'tcx> for Wf<'_, 'genv, 'tcx>

source§

impl<'genv, 'tcx> ConvPhase<'genv, 'tcx> for AfterSortck<'_, 'genv, 'tcx>