Struct RefinementResolver

Source
pub(crate) struct RefinementResolver<'a, 'genv, 'tcx> {
    scopes: Vec<Scope>,
    sort_params: FxIndexSet<Symbol>,
    param_defs: FxIndexMap<NodeId, ParamDef>,
    resolver: &'a mut CrateResolver<'genv, 'tcx>,
    path_res_map: FxHashMap<NodeId, ExprRes<NodeId>>,
    errors: Errors<'genv>,
}

Fields§

§scopes: Vec<Scope>§sort_params: FxIndexSet<Symbol>§param_defs: FxIndexMap<NodeId, ParamDef>§resolver: &'a mut CrateResolver<'genv, 'tcx>§path_res_map: FxHashMap<NodeId, ExprRes<NodeId>>§errors: Errors<'genv>

Implementations§

Source§

impl<'a, 'genv, 'tcx> RefinementResolver<'a, 'genv, 'tcx>

Source

pub(crate) fn for_flux_item( resolver: &'a mut CrateResolver<'genv, 'tcx>, sort_params: &[Ident], ) -> Self

Source

pub(crate) fn for_rust_item( resolver: &'a mut CrateResolver<'genv, 'tcx>, ) -> Self

Source

pub(crate) fn resolve_qualifier( resolver: &'a mut CrateResolver<'genv, 'tcx>, qualifier: &Qualifier, ) -> Result<(), ErrorGuaranteed>

Source

pub(crate) fn resolve_defn( resolver: &'a mut CrateResolver<'genv, 'tcx>, defn: &SpecFunc, ) -> Result<(), ErrorGuaranteed>

Source

pub(crate) fn resolve_fn_sig( resolver: &'a mut CrateResolver<'genv, 'tcx>, fn_sig: &FnSig, ) -> Result<(), ErrorGuaranteed>

Source

pub(crate) fn resolve_struct_def( resolver: &'a mut CrateResolver<'genv, 'tcx>, struct_def: &StructDef, ) -> Result<(), ErrorGuaranteed>

Source

pub(crate) fn resolve_enum_def( resolver: &'a mut CrateResolver<'genv, 'tcx>, enum_def: &EnumDef, ) -> Result<(), ErrorGuaranteed>

Source

pub(crate) fn resolve_constant( resolver: &'a mut CrateResolver<'genv, 'tcx>, constant_info: &ConstantInfo, ) -> Result<(), ErrorGuaranteed>

Source

pub(crate) fn resolve_ty_alias( resolver: &'a mut CrateResolver<'genv, 'tcx>, ty_alias: &TyAlias, ) -> Result<(), ErrorGuaranteed>

Source

pub(crate) fn resolve_impl( resolver: &'a mut CrateResolver<'genv, 'tcx>, impl_: &Impl, ) -> Result<(), ErrorGuaranteed>

Source

pub(crate) fn resolve_trait( resolver: &'a mut CrateResolver<'genv, 'tcx>, trait_: &Trait, ) -> Result<(), ErrorGuaranteed>

Source

fn new( resolver: &'a mut CrateResolver<'genv, 'tcx>, sort_params: FxIndexSet<Symbol>, ) -> Self

Source

fn run( self, f: impl FnOnce(&mut ScopedVisitorWrapper<Self>), ) -> Result<(), ErrorGuaranteed>

Source

fn define_param( &mut self, ident: Ident, kind: ParamKind, param_id: NodeId, scope: Option<NodeId>, )

Source

fn find(&mut self, ident: Ident) -> Option<ParamRes>

Source

fn try_resolve_enum_variant( &mut self, typ: Ident, variant: Ident, ) -> Option<ExprRes<NodeId>>

Source

fn resolve_path(&mut self, path: &ExprPath)

Source

fn resolve_ident(&mut self, ident: Ident, node_id: NodeId)

Source

fn try_resolve_expr_with_ribs<S: Segment>( &mut self, segments: &[S], ) -> Option<ExprRes<NodeId>>

Source

fn try_resolve_param(&mut self, ident: Ident) -> Option<ExprRes<NodeId>>

Source

fn try_resolve_global_func(&mut self, ident: Ident) -> Option<ExprRes<NodeId>>

Source

fn resolve_sort_path(&mut self, path: &SortPath)

Source

fn try_resolve_sort_param(&self, path: &SortPath) -> Option<SortRes>

Source

fn try_resolve_sort_with_ribs(&mut self, path: &SortPath) -> Option<SortRes>

Source

fn try_resolve_user_sort(&self, path: &SortPath) -> Option<SortRes>

Source

fn try_resolve_prim_sort(&self, path: &SortPath) -> Option<SortRes>

Source

pub(crate) fn finish(self) -> Result<(), ErrorGuaranteed>

Source

fn resolver_output(&self) -> &ResolverOutput

Trait Implementations§

Source§

impl ScopedVisitor for RefinementResolver<'_, '_, '_>

Source§

fn is_box(&self, segment: &PathSegment) -> bool

Source§

fn enter_scope(&mut self, kind: ScopeKind) -> ControlFlow<()>

Source§

fn exit_scope(&mut self)

Source§

fn on_enum_variant(&mut self, variant: &VariantDef)

Source§

fn on_fn_sig(&mut self, fn_sig: &FnSig)

Source§

fn on_fn_output(&mut self, output: &FnOutput)

Source§

fn on_refine_param(&mut self, param: &RefineParam)

Source§

fn on_loc(&mut self, loc: Ident, node_id: NodeId)

Source§

fn on_path(&mut self, path: &ExprPath)

Source§

fn on_base_sort(&mut self, sort: &BaseSort)

Source§

fn wrap(self) -> ScopedVisitorWrapper<Self>

Source§

fn on_implicit_param( &mut self, _ident: Ident, _kind: ParamKind, _node_id: NodeId, )

Source§

fn on_generic_param(&mut self, _param: &GenericParam)

Auto Trait Implementations§

§

impl<'a, 'genv, 'tcx> !Freeze for RefinementResolver<'a, 'genv, 'tcx>

§

impl<'a, 'genv, 'tcx> !RefUnwindSafe for RefinementResolver<'a, 'genv, 'tcx>

§

impl<'a, 'genv, 'tcx> !Send for RefinementResolver<'a, 'genv, 'tcx>

§

impl<'a, 'genv, 'tcx> !Sync for RefinementResolver<'a, 'genv, 'tcx>

§

impl<'a, 'genv, 'tcx> Unpin for RefinementResolver<'a, 'genv, 'tcx>

§

impl<'a, 'genv, 'tcx> !UnwindSafe for RefinementResolver<'a, 'genv, 'tcx>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.