struct FluxItemCtxt<'genv, 'tcx> {
genv: GlobalEnv<'genv, 'tcx>,
resolver_output: &'genv ResolverOutput,
local_id_gen: IndexGen<ItemLocalId>,
owner: FluxLocalDefId,
errors: Errors<'genv>,
}
Fields§
§genv: GlobalEnv<'genv, 'tcx>
§resolver_output: &'genv ResolverOutput
§local_id_gen: IndexGen<ItemLocalId>
§owner: FluxLocalDefId
§errors: Errors<'genv>
Implementations§
Source§impl<'genv, 'tcx> FluxItemCtxt<'genv, 'tcx>
impl<'genv, 'tcx> FluxItemCtxt<'genv, 'tcx>
fn with<T>( genv: GlobalEnv<'genv, 'tcx>, resolver_output: &'genv ResolverOutput, owner: FluxLocalDefId, f: impl FnOnce(&mut Self) -> T, ) -> Result<T, ErrorGuaranteed>
Trait Implementations§
Source§impl<'genv, 'tcx> DesugarCtxt<'genv, 'tcx> for FluxItemCtxt<'genv, 'tcx>
impl<'genv, 'tcx> DesugarCtxt<'genv, 'tcx> for FluxItemCtxt<'genv, 'tcx>
fn next_fhir_id(&self) -> FhirId
fn genv(&self) -> GlobalEnv<'genv, 'tcx>
fn resolver_output(&self) -> &'genv ResolverOutput
fn desugar_impl_trait(&mut self, _: NodeId, _: &[TraitRef]) -> TyKind<'genv>
fn resolve_implicit_param( &self, node_id: NodeId, ) -> Option<(ParamId, ParamKind)>
fn desugar_epath(&self, path: &ExprPath) -> PathExpr<'genv>
fn desugar_loc( &self, ident: Ident, node_id: NodeId, ) -> Result<ExprRes, ErrorGuaranteed>
fn resolve_param(&self, node_id: NodeId) -> (ParamId, ParamKind)
fn resolve_implicit_params( &self, scope: NodeId, ) -> impl ExactSizeIterator<Item = (Ident, ParamId, ParamKind)>
fn implicit_params_to_params( &self, scope: NodeId, ) -> impl ExactSizeIterator<Item = RefineParam<'genv>>
fn desugar_refine_params( &mut self, params: &[RefineParam], ) -> &'genv [RefineParam<'genv>]
fn desugar_refine_params_iter( &mut self, params: &[RefineParam], ) -> impl ExactSizeIterator<Item = RefineParam<'genv>>
fn desugar_refine_param(&mut self, param: &RefineParam) -> RefineParam<'genv>
fn desugar_sort( &mut self, sort: &Sort, generic_id_to_var_idx: Option<&FxIndexSet<DefId>>, ) -> Sort<'genv>
fn desugar_base_sort( &mut self, sort: &BaseSort, generic_id_to_var_idx: Option<&FxIndexSet<DefId>>, ) -> Sort<'genv>
fn desugar_generic_args( &mut self, res: Res, args: &[GenericArg], ) -> (&'genv [GenericArg<'genv>], &'genv [AssocItemConstraint<'genv>])
Source§fn desugar_ty(&mut self, ty: &Ty) -> Ty<'genv>
fn desugar_ty(&mut self, ty: &Ty) -> Ty<'genv>
This is the mega desugaring function
surface::Ty
-> fhir::Ty
.
These are both similar representations. The most important difference is that
fhir::Ty
has explicit refinement parameters and surface::Ty
does not.
Refinements are implicitly scoped in surface.fn desugar_const_arg(const_arg: &ConstArg) -> ConstArg
fn desugar_bty(&mut self, bty: &BaseTy) -> BaseTy<'genv>
fn desugar_path_to_bty( &mut self, qself: Option<&Ty>, path: &Path, ) -> BaseTy<'genv>
fn desugar_qpath(&mut self, qself: Option<&Ty>, path: &Path) -> QPath<'genv>
fn desugar_path_segment(&mut self, segment: &PathSegment) -> PathSegment<'genv>
fn ty_path(&self, qpath: QPath<'genv>) -> Ty<'genv>
fn mk_lft_hole(&self) -> Lifetime
fn desugar_indices(&mut self, idxs: &Indices) -> Expr<'genv>
fn desugar_refine_arg(&mut self, arg: &RefineArg) -> Expr<'genv>
fn implicit_param_into_refine_arg( &self, ident: Ident, node_id: NodeId, ) -> Option<Expr<'genv>>
fn desugar_expr(&mut self, expr: &Expr) -> Expr<'genv>
fn desugar_call(&mut self, callee: &Expr, args: &[Expr]) -> ExprKind<'genv>
fn desugar_constructor( &mut self, path: Option<&ExprPath>, args: &[ConstructorArg], ) -> ExprKind<'genv>
fn desugar_exprs(&mut self, exprs: &[Expr]) -> &'genv [Expr<'genv>]
fn try_parse_int_lit( &self, span: Span, s: &str, ) -> Result<u128, ErrorGuaranteed>
Source§impl ErrorCollector<ErrorGuaranteed> for FluxItemCtxt<'_, '_>
impl ErrorCollector<ErrorGuaranteed> for FluxItemCtxt<'_, '_>
type Result = Result<(), ErrorGuaranteed>
fn collect(&mut self, err: ErrorGuaranteed)
fn into_result(self) -> Self::Result
Source§impl ErrorEmitter for FluxItemCtxt<'_, '_>
impl ErrorEmitter for FluxItemCtxt<'_, '_>
fn emit<'a>(&'a self, err: impl Diagnostic<'a>) -> ErrorGuaranteed
Auto Trait Implementations§
impl<'genv, 'tcx> !Freeze for FluxItemCtxt<'genv, 'tcx>
impl<'genv, 'tcx> !RefUnwindSafe for FluxItemCtxt<'genv, 'tcx>
impl<'genv, 'tcx> !Send for FluxItemCtxt<'genv, 'tcx>
impl<'genv, 'tcx> !Sync for FluxItemCtxt<'genv, 'tcx>
impl<'genv, 'tcx> Unpin for FluxItemCtxt<'genv, 'tcx>
impl<'genv, 'tcx> !UnwindSafe for FluxItemCtxt<'genv, 'tcx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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