pub struct Inference<'db> {
pub data: &'db mut InferenceData,
/* private fields */
}
Expand description
State of inference. A system of inference constraints.
Fields§
§data: &'db mut InferenceData
Implementations§
source§impl Inference<'_>
impl Inference<'_>
sourcepub fn reduce_impl_ty(
&mut self,
impl_type_id: ImplTypeId,
) -> InferenceResult<TypeId>
pub fn reduce_impl_ty( &mut self, impl_type_id: ImplTypeId, ) -> InferenceResult<TypeId>
Reduces an impl type to a concrete type.
sourcepub fn reduce_impl_constant(
&mut self,
impl_const_id: ImplConstantId,
) -> InferenceResult<ConstValueId>
pub fn reduce_impl_constant( &mut self, impl_const_id: ImplConstantId, ) -> InferenceResult<ConstValueId>
Reduces an impl constant to a concrete const.
sourcepub fn reduce_impl_impl(
&mut self,
impl_impl_id: ImplImplId,
) -> InferenceResult<ImplId>
pub fn reduce_impl_impl( &mut self, impl_impl_id: ImplImplId, ) -> InferenceResult<ImplId>
Reduces an impl impl to a concrete impl.
sourcepub fn rewritten_impl_type(
&mut self,
id: ImplVarId,
trait_type_id: TraitTypeId,
) -> TypeId
pub fn rewritten_impl_type( &mut self, id: ImplVarId, trait_type_id: TraitTypeId, ) -> TypeId
Returns the type of an impl var’s type item. The type may be a variable itself, but it may previously exist, so may be more specific due to rewriting.
sourcepub fn rewritten_impl_constant(
&mut self,
id: ImplVarId,
trait_constant: TraitConstantId,
) -> ConstValueId
pub fn rewritten_impl_constant( &mut self, id: ImplVarId, trait_constant: TraitConstantId, ) -> ConstValueId
Returns the constant value of an impl var’s constant item. The constant may be a variable itself, but it may previously exist, so may be more specific due to rewriting.
sourcepub fn rewritten_impl_impl(
&mut self,
id: ImplVarId,
concrete_trait_impl: ConcreteTraitImplId,
) -> ImplId
pub fn rewritten_impl_impl( &mut self, id: ImplVarId, concrete_trait_impl: ConcreteTraitImplId, ) -> ImplId
Returns the inner_impl value of an impl var’s impl item. The inner_impl may be a variable itself, but it may previously exist, so may be more specific due to rewriting.
source§impl<'db> Inference<'db>
impl<'db> Inference<'db>
sourcepub fn impl_assignment(&self, var_id: LocalImplVarId) -> Option<ImplId>
pub fn impl_assignment(&self, var_id: LocalImplVarId) -> Option<ImplId>
Getter for an impl var assignment.
sourcepub fn new_type_var(&mut self, stable_ptr: Option<SyntaxStablePtrId>) -> TypeId
pub fn new_type_var(&mut self, stable_ptr: Option<SyntaxStablePtrId>) -> TypeId
Allocates a new TypeVar for an unknown type that needs to be inferred. Returns a wrapping TypeId.
sourcepub fn new_type_var_raw(
&mut self,
stable_ptr: Option<SyntaxStablePtrId>,
) -> TypeVar
pub fn new_type_var_raw( &mut self, stable_ptr: Option<SyntaxStablePtrId>, ) -> TypeVar
Allocates a new TypeVar for an unknown type that needs to be inferred. Returns the variable id.
sourcepub fn impl_type_assignment(&mut self, impl_type: ImplTypeId) -> TypeId
pub fn impl_type_assignment(&mut self, impl_type: ImplTypeId) -> TypeId
Getter for an impl type assignment. Creates a new type var if the impl type is not yet assigned.
sourcepub fn finalize_impl_type_bounds(&mut self)
pub fn finalize_impl_type_bounds(&mut self)
If an impl type is not fully inferred, we assign it’s var to the original type
sourcepub fn new_const_var(
&mut self,
stable_ptr: Option<SyntaxStablePtrId>,
ty: TypeId,
) -> ConstValueId
pub fn new_const_var( &mut self, stable_ptr: Option<SyntaxStablePtrId>, ty: TypeId, ) -> ConstValueId
Allocates a new ConstVar for an unknown consts that needs to be inferred. Returns a wrapping ConstValueId.
sourcepub fn new_const_var_raw(
&mut self,
stable_ptr: Option<SyntaxStablePtrId>,
) -> ConstVar
pub fn new_const_var_raw( &mut self, stable_ptr: Option<SyntaxStablePtrId>, ) -> ConstVar
Allocates a new ConstVar for an unknown type that needs to be inferred. Returns the variable id.
sourcepub fn new_impl_var(
&mut self,
concrete_trait_id: ConcreteTraitId,
stable_ptr: Option<SyntaxStablePtrId>,
lookup_context: ImplLookupContext,
) -> ImplId
pub fn new_impl_var( &mut self, concrete_trait_id: ConcreteTraitId, stable_ptr: Option<SyntaxStablePtrId>, lookup_context: ImplLookupContext, ) -> ImplId
Allocates a new ImplVar for an unknown type that needs to be inferred. Returns a wrapping ImplId.
sourcepub fn solve(&mut self) -> InferenceResult<()>
pub fn solve(&mut self) -> InferenceResult<()>
Solves the inference system. After a successful solve, there are no more pending impl
inferences.
Returns whether the inference was successful. If not, the error may be found by
.error_state()
.
sourcepub fn solution_set(&mut self) -> InferenceResult<SolutionSet<()>>
pub fn solution_set(&mut self) -> InferenceResult<SolutionSet<()>>
Returns the solution set status for the inference: Whether there is a unique solution, multiple solutions, no solutions or an error.
sourcepub fn finalize_without_reporting(
&mut self,
) -> Result<(), (ErrorSet, Option<SyntaxStablePtrId>)>
pub fn finalize_without_reporting( &mut self, ) -> Result<(), (ErrorSet, Option<SyntaxStablePtrId>)>
Finalizes the inference by inferring uninferred numeric literals as felt252. Returns an error and does not report it.
sourcepub fn finalize(
&mut self,
diagnostics: &mut SemanticDiagnostics,
stable_ptr: SyntaxStablePtrId,
)
pub fn finalize( &mut self, diagnostics: &mut SemanticDiagnostics, stable_ptr: SyntaxStablePtrId, )
Finalizes the inference and report diagnostics if there are any errors.
All the remaining type vars are mapped to the missing
type, to prevent additional
diagnostics.
sourcepub fn trait_solution_set(
&mut self,
concrete_trait_id: ConcreteTraitId,
lookup_context: ImplLookupContext,
) -> InferenceResult<SolutionSet<(CanonicalImpl, CanonicalMapping)>>
pub fn trait_solution_set( &mut self, concrete_trait_id: ConcreteTraitId, lookup_context: ImplLookupContext, ) -> InferenceResult<SolutionSet<(CanonicalImpl, CanonicalMapping)>>
Computes the solution set for a trait with a recursive query.
sourcepub fn set_error(&mut self, err: InferenceError) -> ErrorSet
pub fn set_error(&mut self, err: InferenceError) -> ErrorSet
Sets an error in the inference state.
Does nothing if an error is already set.
Returns an ErrorSet
that can be used in reporting the error.
sourcepub fn is_error_set(&self) -> InferenceResult<()>
pub fn is_error_set(&self) -> InferenceResult<()>
Returns whether an error is set (either pending or consumed).
sourcepub fn consume_error_without_reporting(
&mut self,
err_set: ErrorSet,
) -> Option<InferenceError>
pub fn consume_error_without_reporting( &mut self, err_set: ErrorSet, ) -> Option<InferenceError>
Consumes the error but doesn’t report it. If there is no error, or the error is consumed,
returns None. This should be used with caution. Always prefer to use
(1) report_on_pending_error
if possible, or (2) consume_reported_error
which is safer.
Gets an ErrorSet
to “enforce” it is only called when an error is set.
sourcepub fn consume_reported_error(
&mut self,
err_set: ErrorSet,
diag_added: DiagnosticAdded,
)
pub fn consume_reported_error( &mut self, err_set: ErrorSet, diag_added: DiagnosticAdded, )
Consumes the error that is already reported. If there is no error, or the error is consumed,
does nothing. This should be used with caution. Always prefer to use
report_on_pending_error
if possible.
Gets an ErrorSet
to “enforce” it is only called when an error is set.
Gets an DiagnosticAdded
to “enforce” it is only called when a diagnostic was reported.
sourcepub fn report_on_pending_error(
&mut self,
_err_set: ErrorSet,
diagnostics: &mut SemanticDiagnostics,
stable_ptr: SyntaxStablePtrId,
) -> DiagnosticAdded
pub fn report_on_pending_error( &mut self, _err_set: ErrorSet, diagnostics: &mut SemanticDiagnostics, stable_ptr: SyntaxStablePtrId, ) -> DiagnosticAdded
Consumes the pending error, if any, and reports it.
Should only be called when an error is set, otherwise it panics.
Gets an ErrorSet
to “enforce” it is only called when an error is set.
If an error was set but it’s already consumed, it doesn’t report it again but returns the
stored DiagnosticAdded
.
sourcepub fn report_modified_if_pending(
&mut self,
err_set: ErrorSet,
report: impl FnOnce() -> DiagnosticAdded,
)
pub fn report_modified_if_pending( &mut self, err_set: ErrorSet, report: impl FnOnce() -> DiagnosticAdded, )
If the current status is of a pending error, reports an alternative diagnostic, by calling
report
, and consumes the error. Otherwise, does nothing.
Methods from Deref<Target = InferenceData>§
pub fn inference<'db, 'b: 'db>( &'db mut self, db: &'b dyn SemanticGroup, ) -> Inference<'db>
pub fn clone_with_inference_id( &self, db: &dyn SemanticGroup, inference_id: InferenceId, ) -> InferenceData
pub fn temporary_clone(&self) -> InferenceData
Trait Implementations§
source§impl<'a> HasDb<&'a dyn SemanticGroup> for Inference<'a>
impl<'a> HasDb<&'a dyn SemanticGroup> for Inference<'a>
fn get_db(&self) -> &'a dyn SemanticGroup
source§impl InferenceConform for Inference<'_>
impl InferenceConform for Inference<'_>
source§fn conform_ty(&mut self, ty0: TypeId, ty1: TypeId) -> InferenceResult<TypeId>
fn conform_ty(&mut self, ty0: TypeId, ty1: TypeId) -> InferenceResult<TypeId>
Conforms ty0 to ty1. Should be called when ty0 should be coerced to ty1. Not symmetric. Returns the reduced type for ty0, or an error if the type is no coercible.
source§fn conform_ty_ex(
&mut self,
ty0: TypeId,
ty1: TypeId,
ty0_is_self: bool,
) -> InferenceResult<(TypeId, usize)>
fn conform_ty_ex( &mut self, ty0: TypeId, ty1: TypeId, ty0_is_self: bool, ) -> InferenceResult<(TypeId, usize)>
Same as conform_ty but supports adding snapshots to ty0 if ty0_is_self
is true.
Returns the reduced type for ty0 and the number of snapshots that needs to be added
for the types to conform.
source§fn conform_const(
&mut self,
id0: ConstValueId,
id1: ConstValueId,
) -> InferenceResult<ConstValueId>
fn conform_const( &mut self, id0: ConstValueId, id1: ConstValueId, ) -> InferenceResult<ConstValueId>
Conforms id0 to id1. Should be called when id0 should be coerced to id1. Not symmetric. Returns the reduced const for id0, or an error if the const is no coercible.
source§fn conform_generic_args(
&mut self,
gargs0: &[GenericArgumentId],
gargs1: &[GenericArgumentId],
) -> InferenceResult<Vec<GenericArgumentId>>
fn conform_generic_args( &mut self, gargs0: &[GenericArgumentId], gargs1: &[GenericArgumentId], ) -> InferenceResult<Vec<GenericArgumentId>>
Conforms generics args. See conform_ty()
.
source§fn conform_generic_arg(
&mut self,
garg0: GenericArgumentId,
garg1: GenericArgumentId,
) -> InferenceResult<GenericArgumentId>
fn conform_generic_arg( &mut self, garg0: GenericArgumentId, garg1: GenericArgumentId, ) -> InferenceResult<GenericArgumentId>
Conforms a generics arg. See conform_ty()
.
source§fn conform_impl(
&mut self,
impl0: ImplId,
impl1: ImplId,
) -> InferenceResult<ImplId>
fn conform_impl( &mut self, impl0: ImplId, impl1: ImplId, ) -> InferenceResult<ImplId>
Conforms an impl. See conform_ty()
.
source§fn conform_traits(
&mut self,
trt0: ConcreteTraitId,
trt1: ConcreteTraitId,
) -> InferenceResult<ConcreteTraitId>
fn conform_traits( &mut self, trt0: ConcreteTraitId, trt1: ConcreteTraitId, ) -> InferenceResult<ConcreteTraitId>
Conforms generics traits. See conform_ty()
.
source§fn ty_contains_var(&mut self, ty: TypeId, var: InferenceVar) -> bool
fn ty_contains_var(&mut self, ty: TypeId, var: InferenceVar) -> bool
Checks if a type tree contains a certain InferenceVar somewhere. Used to avoid inference cycles.
source§fn generic_args_contain_var(
&mut self,
generic_args: &[GenericArgumentId],
var: InferenceVar,
) -> bool
fn generic_args_contain_var( &mut self, generic_args: &[GenericArgumentId], var: InferenceVar, ) -> bool
Checks if a slice of generics arguments contain a certain InferenceVar somewhere. Used to avoid inference cycles.
source§fn impl_contains_var(&mut self, impl_id: ImplId, var: InferenceVar) -> bool
fn impl_contains_var(&mut self, impl_id: ImplId, var: InferenceVar) -> bool
Checks if an impl contains a certain InferenceVar somewhere. Used to avoid inference cycles.
source§fn function_contains_var(
&mut self,
function_id: FunctionId,
var: InferenceVar,
) -> bool
fn function_contains_var( &mut self, function_id: FunctionId, var: InferenceVar, ) -> bool
Checks if a function contains a certain InferenceVar in its generic arguments or in the generic arguments of the impl containing the function (in case the function is an impl function).
Used to avoid inference cycles.
fn maybe_peel_snapshots( &mut self, ty0_is_self: bool, ty1: TypeId, ) -> (usize, TypeLongId)
fn conform_generic_function( &mut self, func0: GenericFunctionId, func1: GenericFunctionId, ) -> InferenceResult<GenericFunctionId>
source§impl InferenceEmbeddings for Inference<'_>
impl InferenceEmbeddings for Inference<'_>
source§fn infer_impl(
&mut self,
uninferred_impl: UninferredImpl,
concrete_trait_id: ConcreteTraitId,
lookup_context: &ImplLookupContext,
stable_ptr: Option<SyntaxStablePtrId>,
) -> InferenceResult<ImplId>
fn infer_impl( &mut self, uninferred_impl: UninferredImpl, concrete_trait_id: ConcreteTraitId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> InferenceResult<ImplId>
Infers all the variables required to make an uninferred impl provide a concrete trait.
source§fn infer_impl_def(
&mut self,
impl_def_id: ImplDefId,
concrete_trait_id: ConcreteTraitId,
lookup_context: &ImplLookupContext,
stable_ptr: Option<SyntaxStablePtrId>,
) -> InferenceResult<ImplId>
fn infer_impl_def( &mut self, impl_def_id: ImplDefId, concrete_trait_id: ConcreteTraitId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> InferenceResult<ImplId>
Infers all the variables required to make an impl (possibly with free generic params) provide a concrete trait.
source§fn infer_impl_alias(
&mut self,
impl_alias_id: ImplAliasId,
concrete_trait_id: ConcreteTraitId,
lookup_context: &ImplLookupContext,
stable_ptr: Option<SyntaxStablePtrId>,
) -> InferenceResult<ImplId>
fn infer_impl_alias( &mut self, impl_alias_id: ImplAliasId, concrete_trait_id: ConcreteTraitId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> InferenceResult<ImplId>
Infers all the variables required to make an impl alias (possibly with free generic params) provide a concrete trait.
source§fn infer_generic_assignment(
&mut self,
generic_params: &[GenericParam],
generic_args: &[GenericArgumentId],
expected_generic_args: &[GenericArgumentId],
lookup_context: &ImplLookupContext,
stable_ptr: Option<SyntaxStablePtrId>,
) -> InferenceResult<Vec<GenericArgumentId>>
fn infer_generic_assignment( &mut self, generic_params: &[GenericParam], generic_args: &[GenericArgumentId], expected_generic_args: &[GenericArgumentId], lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> InferenceResult<Vec<GenericArgumentId>>
Chooses and assignment to generic_params s.t. generic_args will be substituted to expected_generic_args. Returns the generic_params assignment.
source§fn infer_generic_args(
&mut self,
generic_params: &[GenericParam],
lookup_context: &ImplLookupContext,
stable_ptr: Option<SyntaxStablePtrId>,
) -> InferenceResult<Vec<GenericArgumentId>>
fn infer_generic_args( &mut self, generic_params: &[GenericParam], lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> InferenceResult<Vec<GenericArgumentId>>
Infers all generic_arguments given the parameters.
source§fn infer_concrete_trait_by_self(
&mut self,
trait_function: TraitFunctionId,
self_ty: TypeId,
lookup_context: &ImplLookupContext,
stable_ptr: Option<SyntaxStablePtrId>,
inference_error_cb: impl FnOnce(InferenceError),
) -> Option<(ConcreteTraitId, usize)>
fn infer_concrete_trait_by_self( &mut self, trait_function: TraitFunctionId, self_ty: TypeId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, inference_error_cb: impl FnOnce(InferenceError), ) -> Option<(ConcreteTraitId, usize)>
Tries to infer a trait function as a method for self_ty
.
Supports snapshot snapshot coercions.
Returns the deduced type and the number of snapshots that need to be added to it.
inference_error_cb
is called for inference errors, but they are not reported here as
diagnostics. The caller has to make sure the diagnostics are reported appropriately.
source§fn infer_generic_arg(
&mut self,
param: &GenericParam,
lookup_context: ImplLookupContext,
stable_ptr: Option<SyntaxStablePtrId>,
) -> InferenceResult<GenericArgumentId>
fn infer_generic_arg( &mut self, param: &GenericParam, lookup_context: ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> InferenceResult<GenericArgumentId>
Infers a generic argument to be passed as a generic parameter. Allocates a new inference variable of the correct kind, and wraps in a generic argument.
source§fn infer_trait_function(
&mut self,
concrete_trait_function: ConcreteTraitGenericFunctionId,
lookup_context: &ImplLookupContext,
stable_ptr: Option<SyntaxStablePtrId>,
) -> InferenceResult<FunctionId>
fn infer_trait_function( &mut self, concrete_trait_function: ConcreteTraitGenericFunctionId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> InferenceResult<FunctionId>
Infers the impl to be substituted instead of a trait for a given trait function, and the generic arguments to be passed to the function. Returns the resulting impl function.
source§fn infer_generic_function(
&mut self,
generic_function: GenericFunctionId,
lookup_context: &ImplLookupContext,
stable_ptr: Option<SyntaxStablePtrId>,
) -> InferenceResult<FunctionId>
fn infer_generic_function( &mut self, generic_function: GenericFunctionId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> InferenceResult<FunctionId>
Infers generic arguments to be passed to a generic function. Returns the resulting specialized function.
source§fn infer_trait_generic_function(
&mut self,
concrete_trait_function: ConcreteTraitGenericFunctionId,
lookup_context: &ImplLookupContext,
stable_ptr: Option<SyntaxStablePtrId>,
) -> GenericFunctionId
fn infer_trait_generic_function( &mut self, concrete_trait_function: ConcreteTraitGenericFunctionId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> GenericFunctionId
Infers the impl to be substituted instead of a trait for a given trait function. Returns the resulting impl generic function.
source§fn infer_trait_type(
&mut self,
concrete_trait_type: ConcreteTraitTypeId,
lookup_context: &ImplLookupContext,
stable_ptr: Option<SyntaxStablePtrId>,
) -> TypeId
fn infer_trait_type( &mut self, concrete_trait_type: ConcreteTraitTypeId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> TypeId
Infers the impl to be substituted instead of a trait for a given trait type. Returns the resulting impl type.
source§fn infer_trait_constant(
&mut self,
concrete_trait_constant: ConcreteTraitConstantId,
lookup_context: &ImplLookupContext,
stable_ptr: Option<SyntaxStablePtrId>,
) -> ImplConstantId
fn infer_trait_constant( &mut self, concrete_trait_constant: ConcreteTraitConstantId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> ImplConstantId
Infers the impl to be substituted instead of a trait for a given trait constant. Returns the resulting impl constant.
source§fn infer_trait_impl(
&mut self,
concrete_trait_impl: ConcreteTraitImplId,
lookup_context: &ImplLookupContext,
stable_ptr: Option<SyntaxStablePtrId>,
) -> ImplImplId
fn infer_trait_impl( &mut self, concrete_trait_impl: ConcreteTraitImplId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> ImplImplId
Infers the impl to be substituted instead of a trait for a given trait impl. Returns the resulting impl impl.
source§impl<'a> SemanticRewriter<ClosureTypeLongId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ClosureTypeLongId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ClosureTypeLongId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConcreteEnumId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConcreteEnumId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ConcreteEnumId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConcreteEnumLongId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConcreteEnumLongId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ConcreteEnumLongId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConcreteExternTypeId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConcreteExternTypeId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ConcreteExternTypeId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConcreteExternTypeLongId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConcreteExternTypeLongId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ConcreteExternTypeLongId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConcreteFunction, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConcreteFunction, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ConcreteFunction, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConcreteFunctionWithBody, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConcreteFunctionWithBody, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ConcreteFunctionWithBody, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConcreteFunctionWithBodyId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConcreteFunctionWithBodyId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ConcreteFunctionWithBodyId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConcreteImplId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConcreteImplId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ConcreteImplId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConcreteImplLongId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConcreteImplLongId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ConcreteImplLongId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConcreteStructId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConcreteStructId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ConcreteStructId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConcreteStructLongId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConcreteStructLongId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ConcreteStructLongId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConcreteTraitGenericFunctionId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConcreteTraitGenericFunctionId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ConcreteTraitGenericFunctionId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConcreteTraitGenericFunctionLongId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConcreteTraitGenericFunctionLongId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ConcreteTraitGenericFunctionLongId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConcreteTraitId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConcreteTraitId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ConcreteTraitId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConcreteTraitLongId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConcreteTraitLongId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ConcreteTraitLongId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConcreteTypeId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConcreteTypeId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ConcreteTypeId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConcreteVariant, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConcreteVariant, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ConcreteVariant, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl SemanticRewriter<ConstValue, NoError> for Inference<'_>
impl SemanticRewriter<ConstValue, NoError> for Inference<'_>
fn internal_rewrite( &mut self, value: &mut ConstValue, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConstValueId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConstValueId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ConstValueId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ConstantId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ConstantId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut ConstantId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExprAssignment, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExprAssignment, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ExprAssignment, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExprClosure, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExprClosure, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ExprClosure, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExprConstant, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExprConstant, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ExprConstant, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExprDesnap, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExprDesnap, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ExprDesnap, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExprEnumVariantCtor, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExprEnumVariantCtor, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ExprEnumVariantCtor, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExprFixedSizeArray, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExprFixedSizeArray, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ExprFixedSizeArray, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExprFunctionCall, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExprFunctionCall, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ExprFunctionCall, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExprFunctionCallArg, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExprFunctionCallArg, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ExprFunctionCallArg, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExprLiteral, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExprLiteral, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ExprLiteral, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExprLogicalOperator, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExprLogicalOperator, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ExprLogicalOperator, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExprMemberAccess, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExprMemberAccess, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ExprMemberAccess, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExprMissing, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExprMissing, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ExprMissing, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExprPropagateError, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExprPropagateError, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ExprPropagateError, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExprSnapshot, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExprSnapshot, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ExprSnapshot, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExprStringLiteral, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExprStringLiteral, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ExprStringLiteral, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExprStructCtor, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExprStructCtor, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ExprStructCtor, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExprVarMemberPath, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExprVarMemberPath, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ExprVarMemberPath, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExternFunctionId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExternFunctionId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut ExternFunctionId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ExternTypeId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ExternTypeId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut ExternTypeId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<FixedSizeArrayItems, NoError> for Inference<'a>
impl<'a> SemanticRewriter<FixedSizeArrayItems, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut FixedSizeArrayItems, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<FreeFunctionId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<FreeFunctionId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut FreeFunctionId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<FunctionId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<FunctionId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut FunctionId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<FunctionLongId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<FunctionLongId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut FunctionLongId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<GeneratedImplId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<GeneratedImplId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut GeneratedImplId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<GeneratedImplItems, NoError> for Inference<'a>
impl<'a> SemanticRewriter<GeneratedImplItems, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut GeneratedImplItems, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<GeneratedImplLongId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<GeneratedImplLongId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut GeneratedImplLongId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<GenericArgumentId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<GenericArgumentId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut GenericArgumentId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<GenericFunctionId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<GenericFunctionId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut GenericFunctionId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<GenericFunctionWithBodyId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<GenericFunctionWithBodyId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut GenericFunctionWithBodyId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<GenericParam, NoError> for Inference<'a>
impl<'a> SemanticRewriter<GenericParam, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut GenericParam, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<GenericParamConst, NoError> for Inference<'a>
impl<'a> SemanticRewriter<GenericParamConst, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut GenericParamConst, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<GenericParamId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<GenericParamId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut GenericParamId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<GenericParamImpl, NoError> for Inference<'a>
impl<'a> SemanticRewriter<GenericParamImpl, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut GenericParamImpl, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<GenericParamType, NoError> for Inference<'a>
impl<'a> SemanticRewriter<GenericParamType, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut GenericParamType, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<Id<Statement>, NoError> for Inference<'a>
impl<'a> SemanticRewriter<Id<Statement>, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut StatementId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ImplAliasId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ImplAliasId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut ImplAliasId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ImplConstantId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ImplConstantId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ImplConstantId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ImplFunctionBodyId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ImplFunctionBodyId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut ImplFunctionBodyId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ImplFunctionId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ImplFunctionId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut ImplFunctionId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ImplGenericFunctionId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ImplGenericFunctionId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ImplGenericFunctionId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ImplGenericFunctionWithBodyId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ImplGenericFunctionWithBodyId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ImplGenericFunctionWithBodyId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ImplImplDefId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ImplImplDefId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut ImplImplDefId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ImplImplId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ImplImplId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ImplImplId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl SemanticRewriter<ImplLongId, NoError> for Inference<'_>
impl SemanticRewriter<ImplLongId, NoError> for Inference<'_>
fn internal_rewrite( &mut self, value: &mut ImplLongId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ImplTypeId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ImplTypeId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ImplTypeId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<InferenceId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<InferenceId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut InferenceId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<InferenceVar, NoError> for Inference<'a>
impl<'a> SemanticRewriter<InferenceVar, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut InferenceVar, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<LocalConstVarId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<LocalConstVarId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut LocalConstVarId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<LocalImplVarId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<LocalImplVarId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut LocalImplVarId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<LocalTypeVarId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<LocalTypeVarId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut LocalTypeVarId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<LocalVarId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<LocalVarId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut LocalVarId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<LocalVariable, NoError> for Inference<'a>
impl<'a> SemanticRewriter<LocalVariable, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut LocalVariable, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<MatchArmSelector, NoError> for Inference<'a>
impl<'a> SemanticRewriter<MatchArmSelector, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut MatchArmSelector, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<PatternEnumVariant, NoError> for Inference<'a>
impl<'a> SemanticRewriter<PatternEnumVariant, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut PatternEnumVariant, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<PatternFixedSizeArray, NoError> for Inference<'a>
impl<'a> SemanticRewriter<PatternFixedSizeArray, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut PatternFixedSizeArray, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<PatternLiteral, NoError> for Inference<'a>
impl<'a> SemanticRewriter<PatternLiteral, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut PatternLiteral, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<PatternMissing, NoError> for Inference<'a>
impl<'a> SemanticRewriter<PatternMissing, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut PatternMissing, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<PatternOtherwise, NoError> for Inference<'a>
impl<'a> SemanticRewriter<PatternOtherwise, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut PatternOtherwise, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<PatternStringLiteral, NoError> for Inference<'a>
impl<'a> SemanticRewriter<PatternStringLiteral, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut PatternStringLiteral, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<PatternStruct, NoError> for Inference<'a>
impl<'a> SemanticRewriter<PatternStruct, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut PatternStruct, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<PatternTuple, NoError> for Inference<'a>
impl<'a> SemanticRewriter<PatternTuple, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut PatternTuple, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<PatternVariable, NoError> for Inference<'a>
impl<'a> SemanticRewriter<PatternVariable, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut PatternVariable, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<StatementBreak, NoError> for Inference<'a>
impl<'a> SemanticRewriter<StatementBreak, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut StatementBreak, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<StatementContinue, NoError> for Inference<'a>
impl<'a> SemanticRewriter<StatementContinue, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut StatementContinue, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<StatementExpr, NoError> for Inference<'a>
impl<'a> SemanticRewriter<StatementExpr, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut StatementExpr, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<StatementItem, NoError> for Inference<'a>
impl<'a> SemanticRewriter<StatementItem, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut StatementItem, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<StatementLet, NoError> for Inference<'a>
impl<'a> SemanticRewriter<StatementLet, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut StatementLet, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<StatementReturn, NoError> for Inference<'a>
impl<'a> SemanticRewriter<StatementReturn, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut StatementReturn, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<TraitConstantId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<TraitConstantId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut TraitConstantId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<TraitFunctionId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<TraitFunctionId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut TraitFunctionId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<TraitImplId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<TraitImplId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut TraitImplId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<TraitTypeId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<TraitTypeId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, _value: &mut TraitTypeId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl SemanticRewriter<TypeLongId, NoError> for Inference<'_>
impl SemanticRewriter<TypeLongId, NoError> for Inference<'_>
fn internal_rewrite( &mut self, value: &mut TypeLongId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<UninferredGeneratedImplId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<UninferredGeneratedImplId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut UninferredGeneratedImplId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<UninferredGeneratedImplLongId, NoError> for Inference<'a>
impl<'a> SemanticRewriter<UninferredGeneratedImplLongId, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut UninferredGeneratedImplLongId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<UninferredImpl, NoError> for Inference<'a>
impl<'a> SemanticRewriter<UninferredImpl, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut UninferredImpl, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl<'a> SemanticRewriter<ValueSelectorArm, NoError> for Inference<'a>
impl<'a> SemanticRewriter<ValueSelectorArm, NoError> for Inference<'a>
fn internal_rewrite( &mut self, value: &mut ValueSelectorArm, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
Auto Trait Implementations§
impl<'db> Freeze for Inference<'db>
impl<'db> !RefUnwindSafe for Inference<'db>
impl<'db> !Send for Inference<'db>
impl<'db> !Sync for Inference<'db>
impl<'db> Unpin for Inference<'db>
impl<'db> !UnwindSafe for Inference<'db>
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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