cairo_lang_semantic::expr::inference::infers

Trait InferenceEmbeddings

Source
pub trait InferenceEmbeddings {
Show 13 methods // Required methods fn infer_impl( &mut self, uninferred_impl: UninferredImpl, 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>; 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_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_args( &mut self, generic_params: &[GenericParam], lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> InferenceResult<Vec<GenericArgumentId>>; 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_generic_arg( &mut self, param: &GenericParam, lookup_context: ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> InferenceResult<GenericArgumentId>; fn infer_trait_function( &mut self, concrete_trait_function: ConcreteTraitGenericFunctionId, 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>; fn infer_trait_generic_function( &mut self, concrete_trait_function: ConcreteTraitGenericFunctionId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> GenericFunctionId; fn infer_trait_type( &mut self, concrete_trait_type: ConcreteTraitTypeId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> TypeId; fn infer_trait_constant( &mut self, concrete_trait_constant: ConcreteTraitConstantId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> ImplConstantId; fn infer_trait_impl( &mut self, concrete_trait_constant: ConcreteTraitImplId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> ImplImplId;
}
Expand description

Functions for embedding generic semantic objects in an existing Inference object, by introducing new variables.

Required Methods§

Source

fn infer_impl( &mut self, uninferred_impl: UninferredImpl, concrete_trait_id: ConcreteTraitId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> InferenceResult<ImplId>

Source

fn infer_impl_def( &mut self, impl_def_id: ImplDefId, concrete_trait_id: ConcreteTraitId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> InferenceResult<ImplId>

Source

fn infer_impl_alias( &mut self, impl_alias_id: ImplAliasId, concrete_trait_id: ConcreteTraitId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> InferenceResult<ImplId>

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>>

Source

fn infer_generic_args( &mut self, generic_params: &[GenericParam], lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> InferenceResult<Vec<GenericArgumentId>>

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)>

Source

fn infer_generic_arg( &mut self, param: &GenericParam, lookup_context: ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> InferenceResult<GenericArgumentId>

Source

fn infer_trait_function( &mut self, concrete_trait_function: ConcreteTraitGenericFunctionId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> InferenceResult<FunctionId>

Source

fn infer_generic_function( &mut self, generic_function: GenericFunctionId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> InferenceResult<FunctionId>

Source

fn infer_trait_generic_function( &mut self, concrete_trait_function: ConcreteTraitGenericFunctionId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> GenericFunctionId

Source

fn infer_trait_type( &mut self, concrete_trait_type: ConcreteTraitTypeId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> TypeId

Source

fn infer_trait_constant( &mut self, concrete_trait_constant: ConcreteTraitConstantId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> ImplConstantId

Source

fn infer_trait_impl( &mut self, concrete_trait_constant: ConcreteTraitImplId, lookup_context: &ImplLookupContext, stable_ptr: Option<SyntaxStablePtrId>, ) -> ImplImplId

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§