pub struct RootDatabase { /* private fields */ }

Implementations§

source§

impl RootDatabase

source

pub fn empty() -> Self

source

pub fn builder() -> RootDatabaseBuilder

source

pub fn snapshot(&self) -> RootDatabase

Snapshots the db for read only.

Trait Implementations§

source§

impl AsFilesGroupMut for RootDatabase

source§

fn as_files_group_mut(&mut self) -> &mut (dyn FilesGroup + 'static)

source§

impl Database for RootDatabase

source§

fn sweep_all(&self, strategy: SweepStrategy)

Iterates through all query storage and removes any values that have not been used since the last revision was created. The intended use-cycle is that you first execute all of your “main” queries; this will ensure that all query values they consume are marked as used. You then invoke this method to remove other values that were not needed for your main query results.
source§

fn salsa_event(&self, event_fn: Event)

This function is invoked at key points in the salsa runtime. It permits the database to be customized and to inject logging or other custom behavior.
source§

fn on_propagated_panic(&self) -> !

This function is invoked when a dependent query is being computed by the other thread, and that thread panics.
source§

fn salsa_runtime(&self) -> &Runtime

Gives access to the underlying salsa runtime.
source§

fn salsa_runtime_mut(&mut self) -> &mut Runtime

Gives access to the underlying salsa runtime.
source§

impl DatabaseOps for RootDatabase

source§

fn ops_database(&self) -> &dyn Database

Upcast this type to a dyn Database.
source§

fn ops_salsa_runtime(&self) -> &Runtime

Gives access to the underlying salsa runtime.
source§

fn ops_salsa_runtime_mut(&mut self) -> &mut Runtime

Gives access to the underlying salsa runtime.
source§

fn fmt_index(&self, input: DatabaseKeyIndex, fmt: &mut Formatter<'_>) -> Result

Formats a database key index in a human readable fashion.
source§

fn maybe_changed_since( &self, input: DatabaseKeyIndex, revision: Revision ) -> bool

True if the computed value for input may have changed since revision.
source§

fn for_each_query(&self, op: &mut dyn FnMut(&dyn QueryStorageMassOps))

Executes the callback for each kind of query.
source§

impl DatabaseStorageTypes for RootDatabase

§

type DatabaseStorage = __SalsaDatabaseStorage

Defines the “storage type”, where all the query data is kept. This type is defined by the database_storage macro.
source§

impl Default for RootDatabase

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl HasMacroPlugins for RootDatabase

source§

impl HasQueryGroup<DefsDatabase> for RootDatabase

source§

fn group_storage(&self) -> &<DefsDatabase as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl HasQueryGroup<FilesDatabase> for RootDatabase

source§

fn group_storage(&self) -> &<FilesDatabase as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl HasQueryGroup<LoweringDatabase> for RootDatabase

source§

fn group_storage(&self) -> &<LoweringDatabase as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl HasQueryGroup<ParserDatabase> for RootDatabase

source§

fn group_storage(&self) -> &<ParserDatabase as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl HasQueryGroup<SemanticDatabase> for RootDatabase

source§

fn group_storage(&self) -> &<SemanticDatabase as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl HasQueryGroup<SierraGenDatabase> for RootDatabase

source§

fn group_storage(&self) -> &<SierraGenDatabase as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl HasQueryGroup<SyntaxDatabase> for RootDatabase

source§

fn group_storage(&self) -> &<SyntaxDatabase as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl ParallelDatabase for RootDatabase

source§

fn snapshot(&self) -> Snapshot<RootDatabase>

Creates a second handle to the database that holds the database fixed at a particular revision. So long as this “frozen” handle exists, any attempt to set an input will block. Read more
source§

impl Upcast<dyn DefsGroup> for RootDatabase

source§

fn upcast(&self) -> &(dyn DefsGroup + 'static)

source§

impl Upcast<dyn FilesGroup> for RootDatabase

source§

fn upcast(&self) -> &(dyn FilesGroup + 'static)

source§

impl Upcast<dyn LoweringGroup> for RootDatabase

source§

fn upcast(&self) -> &(dyn LoweringGroup + 'static)

source§

impl Upcast<dyn SemanticGroup> for RootDatabase

source§

fn upcast(&self) -> &(dyn SemanticGroup + 'static)

source§

impl Upcast<dyn SyntaxGroup> for RootDatabase

source§

fn upcast(&self) -> &(dyn SyntaxGroup + 'static)

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<DB> DefsGroup for DBwhere DB: FilesGroup + SyntaxGroup + Upcast<dyn SyntaxGroup> + ParserGroup + Upcast<dyn FilesGroup> + HasMacroPlugins + Database + HasQueryGroup<DefsDatabase>,

source§

fn intern_constant(&self, key0: ConstantLongId) -> ConstantId

source§

fn lookup_intern_constant(&self, key0: ConstantId) -> ConstantLongId

source§

fn intern_submodule(&self, key0: SubmoduleLongId) -> SubmoduleId

source§

fn lookup_intern_submodule(&self, key0: SubmoduleId) -> SubmoduleLongId

source§

fn intern_use(&self, key0: UseLongId) -> UseId

source§

fn lookup_intern_use(&self, key0: UseId) -> UseLongId

source§

fn intern_free_function(&self, key0: FreeFunctionLongId) -> FreeFunctionId

source§

fn lookup_intern_free_function( &self, key0: FreeFunctionId ) -> FreeFunctionLongId

source§

fn intern_impl_function(&self, key0: ImplFunctionLongId) -> ImplFunctionId

source§

fn lookup_intern_impl_function( &self, key0: ImplFunctionId ) -> ImplFunctionLongId

source§

fn intern_struct(&self, key0: StructLongId) -> StructId

source§

fn lookup_intern_struct(&self, key0: StructId) -> StructLongId

source§

fn intern_enum(&self, key0: EnumLongId) -> EnumId

source§

fn lookup_intern_enum(&self, key0: EnumId) -> EnumLongId

source§

fn intern_type_alias(&self, key0: TypeAliasLongId) -> TypeAliasId

source§

fn lookup_intern_type_alias(&self, key0: TypeAliasId) -> TypeAliasLongId

source§

fn intern_impl_alias(&self, key0: ImplAliasLongId) -> ImplAliasId

source§

fn lookup_intern_impl_alias(&self, key0: ImplAliasId) -> ImplAliasLongId

source§

fn intern_member(&self, key0: MemberLongId) -> MemberId

source§

fn lookup_intern_member(&self, key0: MemberId) -> MemberLongId

source§

fn intern_variant(&self, key0: VariantLongId) -> VariantId

source§

fn lookup_intern_variant(&self, key0: VariantId) -> VariantLongId

source§

fn intern_trait(&self, key0: TraitLongId) -> TraitId

source§

fn lookup_intern_trait(&self, key0: TraitId) -> TraitLongId

source§

fn intern_trait_function(&self, key0: TraitFunctionLongId) -> TraitFunctionId

source§

fn lookup_intern_trait_function( &self, key0: TraitFunctionId ) -> TraitFunctionLongId

source§

fn intern_impl(&self, key0: ImplDefLongId) -> ImplDefId

source§

fn lookup_intern_impl(&self, key0: ImplDefId) -> ImplDefLongId

source§

fn intern_extern_type(&self, key0: ExternTypeLongId) -> ExternTypeId

source§

fn lookup_intern_extern_type(&self, key0: ExternTypeId) -> ExternTypeLongId

source§

fn intern_extern_function(&self, key0: ExternFunctionLongId) -> ExternFunctionId

source§

fn lookup_intern_extern_function( &self, key0: ExternFunctionId ) -> ExternFunctionLongId

source§

fn intern_param(&self, key0: ParamLongId) -> ParamId

source§

fn lookup_intern_param(&self, key0: ParamId) -> ParamLongId

source§

fn intern_generic_param(&self, key0: GenericParamLongId) -> GenericParamId

source§

fn lookup_intern_generic_param( &self, key0: GenericParamId ) -> GenericParamLongId

source§

fn intern_local_var(&self, key0: LocalVarLongId) -> LocalVarId

source§

fn lookup_intern_local_var(&self, key0: LocalVarId) -> LocalVarLongId

source§

fn module_main_file(&self, key0: ModuleId) -> Result<FileId, DiagnosticAdded>

Gets the main file of the module. A module might have more virtual files generated by plugins.
source§

fn module_files(&self, key0: ModuleId) -> Result<Vec<FileId>, DiagnosticAdded>

Gets all the files of a module - main files and generated virtual files.
source§

fn module_file(&self, key0: ModuleFileId) -> Result<FileId, DiagnosticAdded>

Gets a file from a module and a FileIndex (i.e. ModuleFileId).
source§

fn module_dir(&self, key0: ModuleId) -> Result<Directory, DiagnosticAdded>

Gets the directory of a module.
source§

fn crate_modules(&self, key0: CrateId) -> Arc<Vec<ModuleId>>

source§

fn priv_file_to_module_mapping(&self) -> OrderedHashMap<FileId, Vec<ModuleId>>

source§

fn file_modules(&self, key0: FileId) -> Result<Vec<ModuleId>, DiagnosticAdded>

source§

fn priv_module_data( &self, key0: ModuleId ) -> Result<ModuleData, DiagnosticAdded>

source§

fn module_submodules( &self, key0: ModuleId ) -> Result<OrderedHashMap<SubmoduleId, ItemModule>, DiagnosticAdded>

source§

fn module_submodules_ids( &self, key0: ModuleId ) -> Result<Vec<SubmoduleId>, DiagnosticAdded>

source§

fn module_constants( &self, key0: ModuleId ) -> Result<OrderedHashMap<ConstantId, ItemConstant>, DiagnosticAdded>

source§

fn module_constants_ids( &self, key0: ModuleId ) -> Result<Vec<ConstantId>, DiagnosticAdded>

source§

fn module_free_functions( &self, key0: ModuleId ) -> Result<OrderedHashMap<FreeFunctionId, FunctionWithBody>, DiagnosticAdded>

source§

fn module_free_functions_ids( &self, key0: ModuleId ) -> Result<Vec<FreeFunctionId>, DiagnosticAdded>

source§

fn module_items( &self, key0: ModuleId ) -> Result<Arc<Vec<ModuleItemId>>, DiagnosticAdded>

source§

fn module_item_name_stable_ptr( &self, key0: ModuleId, key1: ModuleItemId ) -> Result<SyntaxStablePtrId, DiagnosticAdded>

Returns the stable ptr of the name of a module item.
source§

fn module_uses( &self, key0: ModuleId ) -> Result<OrderedHashMap<UseId, UsePathLeaf>, DiagnosticAdded>

source§

fn module_uses_ids(&self, key0: ModuleId) -> Result<Vec<UseId>, DiagnosticAdded>

source§

fn module_structs( &self, key0: ModuleId ) -> Result<OrderedHashMap<StructId, ItemStruct>, DiagnosticAdded>

source§

fn module_structs_ids( &self, key0: ModuleId ) -> Result<Vec<StructId>, DiagnosticAdded>

source§

fn module_enums( &self, key0: ModuleId ) -> Result<OrderedHashMap<EnumId, ItemEnum>, DiagnosticAdded>

source§

fn module_enums_ids( &self, key0: ModuleId ) -> Result<Vec<EnumId>, DiagnosticAdded>

source§

fn module_type_aliases( &self, key0: ModuleId ) -> Result<OrderedHashMap<TypeAliasId, ItemTypeAlias>, DiagnosticAdded>

source§

fn module_type_aliases_ids( &self, key0: ModuleId ) -> Result<Vec<TypeAliasId>, DiagnosticAdded>

source§

fn module_impl_aliases( &self, key0: ModuleId ) -> Result<OrderedHashMap<ImplAliasId, ItemImplAlias>, DiagnosticAdded>

source§

fn module_impl_aliases_ids( &self, key0: ModuleId ) -> Result<Vec<ImplAliasId>, DiagnosticAdded>

source§

fn module_traits( &self, key0: ModuleId ) -> Result<OrderedHashMap<TraitId, ItemTrait>, DiagnosticAdded>

source§

fn module_traits_ids( &self, key0: ModuleId ) -> Result<Vec<TraitId>, DiagnosticAdded>

source§

fn module_impls( &self, key0: ModuleId ) -> Result<OrderedHashMap<ImplDefId, ItemImpl>, DiagnosticAdded>

source§

fn module_impls_ids( &self, key0: ModuleId ) -> Result<Vec<ImplDefId>, DiagnosticAdded>

source§

fn module_extern_types( &self, key0: ModuleId ) -> Result<OrderedHashMap<ExternTypeId, ItemExternType>, DiagnosticAdded>

source§

fn module_extern_types_ids( &self, key0: ModuleId ) -> Result<Vec<ExternTypeId>, DiagnosticAdded>

source§

fn module_extern_functions( &self, key0: ModuleId ) -> Result<OrderedHashMap<ExternFunctionId, ItemExternFunction>, DiagnosticAdded>

source§

fn module_extern_functions_ids( &self, key0: ModuleId ) -> Result<Vec<ExternFunctionId>, DiagnosticAdded>

source§

fn module_generated_file_infos( &self, key0: ModuleId ) -> Result<Vec<Option<GeneratedFileInfo>>, DiagnosticAdded>

source§

fn module_plugin_diagnostics( &self, key0: ModuleId ) -> Result<Vec<(ModuleFileId, PluginDiagnostic)>, DiagnosticAdded>

source§

impl<T> Elongate for Twhere T: Upcast<dyn SemanticGroup>,

source§

fn elongate(&self) -> &(dyn SemanticGroup + 'static)

source§

impl<DB> FilesGroup for DBwhere DB: Database + HasQueryGroup<FilesDatabase>,

source§

fn intern_crate(&self, key0: CrateLongId) -> CrateId

source§

fn lookup_intern_crate(&self, key0: CrateId) -> CrateLongId

source§

fn intern_file(&self, key0: FileLongId) -> FileId

source§

fn lookup_intern_file(&self, key0: FileId) -> FileLongId

source§

fn intern_flag(&self, key0: FlagLongId) -> FlagId

source§

fn lookup_intern_flag(&self, key0: FlagId) -> FlagLongId

source§

fn crate_roots(&self) -> Arc<OrderedHashMap<CrateId, Directory>>

Main input of the project. Lists all the crates.
source§

fn set_crate_roots(&mut self, value__: Arc<OrderedHashMap<CrateId, Directory>>)

Set the value of the crate_roots input. Read more
source§

fn set_crate_roots_with_durability( &mut self, value__: Arc<OrderedHashMap<CrateId, Directory>>, durability__: Durability )

Set the value of the crate_roots input and promise that its value will never change again. Read more
source§

fn file_overrides(&self) -> Arc<OrderedHashMap<FileId, Arc<String>>>

Overrides for file content. Mostly used by language server and tests. TODO(spapini): Currently, when this input changes, all the file_content() queries will be invalidated. Change this mechanism to hold file_overrides on the db struct outside salsa mechanism, and invalidate manually.
source§

fn set_file_overrides( &mut self, value__: Arc<OrderedHashMap<FileId, Arc<String>>> )

Set the value of the file_overrides input. Read more
source§

fn set_file_overrides_with_durability( &mut self, value__: Arc<OrderedHashMap<FileId, Arc<String>>>, durability__: Durability )

Set the value of the file_overrides input and promise that its value will never change again. Read more
source§

fn flags(&self) -> Arc<OrderedHashMap<FlagId, Arc<Flag>>>

The compilation flags.
source§

fn set_flags(&mut self, value__: Arc<OrderedHashMap<FlagId, Arc<Flag>>>)

Set the value of the flags input. Read more
source§

fn set_flags_with_durability( &mut self, value__: Arc<OrderedHashMap<FlagId, Arc<Flag>>>, durability__: Durability )

Set the value of the flags input and promise that its value will never change again. Read more
source§

fn cfg_set(&self) -> Arc<CfgSet>

The #[cfg(...)] options.
source§

fn set_cfg_set(&mut self, value__: Arc<CfgSet>)

Set the value of the cfg_set input. Read more
source§

fn set_cfg_set_with_durability( &mut self, value__: Arc<CfgSet>, durability__: Durability )

Set the value of the cfg_set input and promise that its value will never change again. Read more
source§

fn crates(&self) -> Vec<CrateId>

List of crates in the project.
source§

fn crate_root_dir(&self, key0: CrateId) -> Option<Directory>

Root directory of the crate.
source§

fn priv_raw_file_content(&self, key0: FileId) -> Option<Arc<String>>

Query for raw file contents. Private.
source§

fn file_content(&self, key0: FileId) -> Option<Arc<String>>

Query for the file contents. This takes overrides into consideration.
source§

fn file_summary(&self, key0: FileId) -> Option<Arc<FileSummary>>

source§

fn get_flag(&self, key0: FlagId) -> Option<Arc<Flag>>

Query to get a compilation flag by its ID.
source§

impl<T> FilesGroupEx for Twhere T: Upcast<dyn FilesGroup> + AsFilesGroupMut + ?Sized,

source§

fn override_file_content(&mut self, file: FileId, content: Option<Arc<String>>)

Overrides file content. None value removes the override.
source§

fn set_crate_root(&mut self, crt: CrateId, root: Option<Directory>)

Sets the root directory of the crate. None value removes the crate.
source§

fn set_flag(&mut self, id: FlagId, value: Option<Arc<Flag>>)

Sets the given flag value. None value removes the flag.
source§

fn use_cfg(&mut self, cfg_set: &CfgSet)

Merges specified CfgSet into one already stored in this db.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<'a, T> FunctionImplicitsTrait<'a> for Twhere T: Upcast<dyn LoweringGroup + 'a> + ?Sized,

source§

impl<T, U> Into<U> for Twhere 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<DB> LoweringGroup for DBwhere DB: SemanticGroup + Upcast<dyn SemanticGroup> + Database + HasQueryGroup<LoweringDatabase>,

source§

fn intern_lowering_function(&self, key0: FunctionLongId) -> FunctionId

source§

fn lookup_intern_lowering_function(&self, key0: FunctionId) -> FunctionLongId

source§

fn intern_lowering_concrete_function_with_body( &self, key0: ConcreteFunctionWithBodyLongId ) -> ConcreteFunctionWithBodyId

source§

fn lookup_intern_lowering_concrete_function_with_body( &self, key0: ConcreteFunctionWithBodyId ) -> ConcreteFunctionWithBodyLongId

source§

fn intern_lowering_function_with_body( &self, key0: FunctionWithBodyLongId ) -> FunctionWithBodyId

source§

fn lookup_intern_lowering_function_with_body( &self, key0: FunctionWithBodyId ) -> FunctionWithBodyLongId

source§

fn intern_location(&self, key0: Location) -> LocationId

source§

fn lookup_intern_location(&self, key0: LocationId) -> Location

source§

fn priv_inline_data( &self, key0: FunctionWithBodyId ) -> Result<Arc<PrivInlineData>, DiagnosticAdded>

source§

fn priv_function_with_body_multi_lowering( &self, key0: FunctionWithBodyId ) -> Result<Arc<MultiLowering>, DiagnosticAdded>

Computes the lowered representation of a function with a body, along with all it generated functions (e.g. closures, lambdas, loops, …).
source§

fn priv_function_with_body_lowering( &self, key0: FunctionWithBodyId ) -> Result<Arc<FlatLowered>, DiagnosticAdded>

Computes the lowered representation of a function with a body before borrow checking.
source§

fn function_with_body_lowering( &self, key0: FunctionWithBodyId ) -> Result<Arc<FlatLowered>, DiagnosticAdded>

Computes the lowered representation of a function with a body.
source§

fn priv_concrete_function_with_body_lowered_flat( &self, key0: ConcreteFunctionWithBodyId ) -> Result<Arc<FlatLowered>, DiagnosticAdded>

A concrete version of priv_function_with_body_multi_lowering
source§

fn concrete_function_with_body_postpanic_lowered( &self, key0: ConcreteFunctionWithBodyId ) -> Result<Arc<FlatLowered>, DiagnosticAdded>

Computes the lowered representation after the panic phase.
source§

fn concrete_function_with_body_lowered( &self, key0: ConcreteFunctionWithBodyId ) -> Result<Arc<FlatLowered>, DiagnosticAdded>

Computes the final lowered representation (after all the internal transformations).
source§

fn concrete_function_with_body_postpanic_direct_callees( &self, key0: ConcreteFunctionWithBodyId ) -> Result<Vec<FunctionId>, DiagnosticAdded>

Returns the set of direct callees of a concrete function with a body after the panic phase.
source§

fn concrete_function_with_body_direct_callees( &self, key0: ConcreteFunctionWithBodyId ) -> Result<Vec<FunctionId>, DiagnosticAdded>

Returns the set of direct callees of a concrete function with a body.
source§

fn concrete_function_with_body_direct_callees_with_body( &self, key0: ConcreteFunctionWithBodyId ) -> Result<Vec<ConcreteFunctionWithBodyId>, DiagnosticAdded>

Returns the set of direct callees which are functions with body of a concrete function with a body (i.e. excluding libfunc callees).
source§

fn concrete_function_with_body_postpanic_direct_callees_with_body( &self, key0: ConcreteFunctionWithBodyId ) -> Result<Vec<ConcreteFunctionWithBodyId>, DiagnosticAdded>

Returns the set of direct callees which are functions with body of a concrete function with a body (i.e. excluding libfunc callees), after the panic phase.
source§

fn function_with_body_lowering_diagnostics( &self, key0: FunctionWithBodyId ) -> Result<Diagnostics<LoweringDiagnostic>, DiagnosticAdded>

Aggregates function level lowering diagnostics.
source§

fn semantic_function_with_body_lowering_diagnostics( &self, key0: FunctionWithBodyId ) -> Result<Diagnostics<LoweringDiagnostic>, DiagnosticAdded>

Aggregates semantic function level lowering diagnostics - along with all its generated function.
source§

fn module_lowering_diagnostics( &self, key0: ModuleId ) -> Result<Diagnostics<LoweringDiagnostic>, DiagnosticAdded>

Aggregates module level lowering diagnostics.
source§

fn file_lowering_diagnostics( &self, key0: FileId ) -> Result<Diagnostics<LoweringDiagnostic>, DiagnosticAdded>

Aggregates file level lowering diagnostics.
source§

fn function_implicits( &self, key0: FunctionId ) -> Result<Vec<TypeId>, DiagnosticAdded>

Returns all the implicit parameters that the function requires (according to both its signature and the functions it calls). The items in the returned vector are unique and the order is consistent, but not necessarily related to the order of the explicit implicits in the signature of the function.
source§

fn scc_implicits( &self, key0: ConcreteSCCRepresentative ) -> Result<Vec<TypeId>, DiagnosticAdded>

Returns all the implicitis used by a strongly connected component of functions.
source§

fn function_may_panic(&self, key0: FunctionId) -> Result<bool, DiagnosticAdded>

Returns whether the function may panic.
source§

fn scc_may_panic( &self, key0: ConcreteSCCRepresentative ) -> Result<bool, DiagnosticAdded>

Returns whether any function in the strongly connected component may panic.
source§

fn has_direct_panic( &self, key0: ConcreteFunctionWithBodyId ) -> Result<bool, DiagnosticAdded>

Checks if the function has a block that ends with panic.
source§

fn function_with_body_direct_callees( &self, key0: FunctionWithBodyId ) -> Result<OrderedHashSet<FunctionId>, DiagnosticAdded>

Returns the set of direct callees of a function with a body.
source§

fn function_with_body_direct_function_with_body_callees( &self, key0: FunctionWithBodyId ) -> Result<OrderedHashSet<FunctionWithBodyId>, DiagnosticAdded>

Returns the set of direct callees which are functions with body of a function with a body (i.e. excluding libfunc callees).
source§

fn contains_cycle( &self, key0: ConcreteFunctionWithBodyId ) -> Result<bool, DiagnosticAdded>

Returns true if the function calls (possibly indirectly) itself, or if it calls (possibly indirectly) such a function. For example, if f0 calls f1, f1 calls f2, f2 calls f3, and f3 calls f2, then Self::contains_cycle will return true for all of these functions.
source§

fn in_cycle(&self, key0: FunctionWithBodyId) -> Result<bool, DiagnosticAdded>

Returns true if the function calls (possibly indirectly) itself. For example, if f0 calls f1, f1 calls f2, f2 calls f3, and f3 calls f2, then Self::in_cycle will return true for f2 and f3, but false for f0 and f1.
source§

fn concrete_function_with_body_scc_representative( &self, key0: ConcreteFunctionWithBodyId ) -> ConcreteSCCRepresentative

Returns the representative of the concrete function’s strongly connected component. The representative is consistently chosen for all the concrete functions in the same SCC.
source§

fn concrete_function_with_body_scc( &self, key0: ConcreteFunctionWithBodyId ) -> Vec<ConcreteFunctionWithBodyId>

Returns all the concrete functions in the same strongly connected component as the given concrete function.
source§

fn concrete_function_with_body_scc_postpanic_representative( &self, key0: ConcreteFunctionWithBodyId ) -> ConcreteSCCRepresentative

Returns the representative of the concrete function’s strongly connected component. The representative is consistently chosen for all the concrete functions in the same SCC. This is using the representation after the panic phase.
source§

fn concrete_function_with_body_postpanic_scc( &self, key0: ConcreteFunctionWithBodyId ) -> Vec<ConcreteFunctionWithBodyId>

Returns all the concrete functions in the same strongly connected component as the given concrete function. This is using the representation after the panic phase.
source§

fn function_with_body_scc( &self, key0: FunctionWithBodyId ) -> Vec<FunctionWithBodyId>

Returns all the functions in the same strongly connected component as the given function.
source§

fn function_with_body_feedback_set( &self, key0: ConcreteFunctionWithBodyId ) -> Result<OrderedHashSet<ConcreteFunctionWithBodyId>, DiagnosticAdded>

Returns the feedback-vertex-set of the given concrete function. A feedback-vertex-set is the set of vertices whose removal leaves a graph without cycles.
source§

fn needs_withdraw_gas( &self, key0: ConcreteFunctionWithBodyId ) -> Result<bool, DiagnosticAdded>

Returns whether the given function needs an additional withdraw_gas call.
source§

fn priv_function_with_body_feedback_set_of_representative( &self, key0: ConcreteSCCRepresentative ) -> Result<OrderedHashSet<ConcreteFunctionWithBodyId>, DiagnosticAdded>

Returns the feedback-vertex-set of the given concrete-function SCC-representative. A feedback-vertex-set is the set of vertices whose removal leaves a graph without cycles.
source§

impl<'a, T> MayPanicTrait<'a> for Twhere T: Upcast<dyn LoweringGroup + 'a> + ?Sized,

source§

impl<DB> ParserGroup for DBwhere DB: SyntaxGroup + Upcast<dyn SyntaxGroup> + FilesGroup + Database + HasQueryGroup<ParserDatabase>,

source§

fn priv_file_syntax_data(&self, key0: FileId) -> SyntaxData

Should only be used internally. Parses a file and returns the result and the generated ParserDiagnostic.
source§

fn file_syntax(&self, key0: FileId) -> Result<Arc<SyntaxFile>, DiagnosticAdded>

Parses a file and returns its AST.
source§

fn file_syntax_diagnostics(&self, key0: FileId) -> Diagnostics<ParserDiagnostic>

Returns the parser diagnostics for this file.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<'a, T> SemanticEnumEx<'a> for Twhere T: Upcast<dyn SemanticGroup + 'a> + ?Sized,

source§

impl<'a, T> SemanticExprLookup<'a> for Twhere T: Upcast<dyn SemanticGroup + 'a> + ?Sized,

source§

impl<DB> SemanticGroup for DBwhere DB: DefsGroup + Upcast<dyn DefsGroup> + ParserGroup + Upcast<dyn FilesGroup> + AsFilesGroupMut + Elongate + Database + HasQueryGroup<SemanticDatabase>,

source§

fn intern_function(&self, key0: FunctionLongId) -> FunctionId

source§

fn lookup_intern_function(&self, key0: FunctionId) -> FunctionLongId

source§

fn intern_concrete_function_with_body( &self, key0: ConcreteFunctionWithBody ) -> ConcreteFunctionWithBodyId

source§

fn lookup_intern_concrete_function_with_body( &self, key0: ConcreteFunctionWithBodyId ) -> ConcreteFunctionWithBody

source§

fn intern_concrete_struct(&self, key0: ConcreteStructLongId) -> ConcreteStructId

source§

fn lookup_intern_concrete_struct( &self, key0: ConcreteStructId ) -> ConcreteStructLongId

source§

fn intern_concrete_enum(&self, key0: ConcreteEnumLongId) -> ConcreteEnumId

source§

fn lookup_intern_concrete_enum( &self, key0: ConcreteEnumId ) -> ConcreteEnumLongId

source§

fn intern_concrete_extern_type( &self, key0: ConcreteExternTypeLongId ) -> ConcreteExternTypeId

source§

fn lookup_intern_concrete_extern_type( &self, key0: ConcreteExternTypeId ) -> ConcreteExternTypeLongId

source§

fn intern_concrete_trait(&self, key0: ConcreteTraitLongId) -> ConcreteTraitId

source§

fn lookup_intern_concrete_trait( &self, key0: ConcreteTraitId ) -> ConcreteTraitLongId

source§

fn intern_concrete_trait_function( &self, key0: ConcreteTraitGenericFunctionLongId ) -> ConcreteTraitGenericFunctionId

source§

fn lookup_intern_concrete_trait_function( &self, key0: ConcreteTraitGenericFunctionId ) -> ConcreteTraitGenericFunctionLongId

source§

fn intern_concrete_impl(&self, key0: ConcreteImplLongId) -> ConcreteImplId

source§

fn lookup_intern_concrete_impl( &self, key0: ConcreteImplId ) -> ConcreteImplLongId

source§

fn intern_type(&self, key0: TypeLongId) -> TypeId

source§

fn lookup_intern_type(&self, key0: TypeId) -> TypeLongId

source§

fn intern_literal(&self, key0: LiteralLongId) -> LiteralId

source§

fn lookup_intern_literal(&self, key0: LiteralId) -> LiteralLongId

source§

fn intern_impl_var(&self, key0: ImplVar) -> ImplVarId

source§

fn lookup_intern_impl_var(&self, key0: ImplVarId) -> ImplVar

source§

fn priv_constant_semantic_data( &self, key0: ConstantId ) -> Result<ConstantData, DiagnosticAdded>

Private query to compute data about a constant definition.
source§

fn constant_semantic_diagnostics( &self, key0: ConstantId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a constant definition.
source§

fn constant_semantic_data( &self, key0: ConstantId ) -> Result<Constant, DiagnosticAdded>

Returns the semantic data of a constant definition.
source§

fn constant_resolver_data( &self, key0: ConstantId ) -> Result<Arc<ResolverData>, DiagnosticAdded>

source§

fn priv_use_semantic_data( &self, key0: UseId ) -> Result<UseData, DiagnosticAdded>

Private query to compute data about a use.
source§

fn use_semantic_diagnostics( &self, key0: UseId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a use.
source§

fn use_resolver_data( &self, key0: UseId ) -> Result<Arc<ResolverData>, DiagnosticAdded>

source§

fn priv_module_semantic_data( &self, key0: ModuleId ) -> Result<Arc<ModuleSemanticData>, DiagnosticAdded>

Private query to compute data about the module.
source§

fn module_scope(&self, key0: ModuleId) -> Result<Arc<Scope>, DiagnosticAdded>

Returns the scope of a module. See Scope.
source§

fn module_item_by_name( &self, key0: ModuleId, key1: SmolStr ) -> Result<Option<ModuleItemId>, DiagnosticAdded>

Returns Maybe::Err if the module was not properly resolved. Returns [Maybe::Ok(Option::None)] if the item does not exist.
source§

fn module_attributes( &self, key0: ModuleId ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes of a module.
source§

fn priv_struct_declaration_data( &self, key0: StructId ) -> Result<StructDeclarationData, DiagnosticAdded>

Private query to compute data about a struct declaration.
source§

fn struct_declaration_diagnostics( &self, key0: StructId ) -> Diagnostics<SemanticDiagnostic>

Returns the declaration diagnostics of a struct.
source§

fn struct_attributes( &self, key0: StructId ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes of a struct.
source§

fn struct_generic_params( &self, key0: StructId ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic parameters of an enum.
source§

fn struct_generic_params_data( &self, key0: StructId ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic parameters data of an enum.
source§

fn struct_declaration_resolver_data( &self, key0: StructId ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a struct declaration.
source§

fn priv_struct_definition_data( &self, key0: StructId ) -> Result<StructDefinitionData, DiagnosticAdded>

Private query to compute data about a struct definition.
source§

fn struct_definition_diagnostics( &self, key0: StructId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a struct definition.
source§

fn struct_members( &self, key0: StructId ) -> Result<OrderedHashMap<SmolStr, Member>, DiagnosticAdded>

Returns the members of a struct.
source§

fn struct_definition_resolver_data( &self, key0: StructId ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a struct definition.
source§

fn priv_enum_declaration_data( &self, key0: EnumId ) -> Result<EnumDeclarationData, DiagnosticAdded>

Private query to compute data about an enum declaration.
source§

fn enum_declaration_diagnostics( &self, key0: EnumId ) -> Diagnostics<SemanticDiagnostic>

Returns the diagnostics of an enum declaration.
source§

fn enum_generic_params( &self, key0: EnumId ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic parameters of an enum.
source§

fn enum_generic_params_data( &self, key0: EnumId ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic parameters data of an enum.
source§

fn enum_attributes( &self, key0: EnumId ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes attached to an enum.
source§

fn enum_declaration_resolver_data( &self, key0: EnumId ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of an enum declaration.
source§

fn priv_enum_definition_data( &self, key0: EnumId ) -> Result<EnumDefinitionData, DiagnosticAdded>

Private query to compute data about an enum definition.
source§

fn enum_definition_diagnostics( &self, key0: EnumId ) -> Diagnostics<SemanticDiagnostic>

Returns the definition diagnostics of an enum definition.
source§

fn enum_variants( &self, key0: EnumId ) -> Result<OrderedHashMap<SmolStr, VariantId>, DiagnosticAdded>

Returns the members of an enum.
source§

fn variant_semantic( &self, key0: EnumId, key1: VariantId ) -> Result<Variant, DiagnosticAdded>

Returns the semantic model of a variant.
source§

fn enum_definition_resolver_data( &self, key0: EnumId ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of an enum definition.
source§

fn priv_type_alias_semantic_data( &self, key0: TypeAliasId ) -> Result<TypeAliasData, DiagnosticAdded>

Private query to compute data about a type alias.
source§

fn type_alias_semantic_diagnostics( &self, key0: TypeAliasId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a type alias.
source§

fn type_alias_resolved_type( &self, key0: TypeAliasId ) -> Result<TypeId, DiagnosticAdded>

Returns the resolved type of a type alias.
source§

fn type_alias_generic_params( &self, key0: TypeAliasId ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic parameters of a type alias.
source§

fn type_alias_generic_params_data( &self, key0: TypeAliasId ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic parameters data of a type alias.
source§

fn type_alias_resolver_data( &self, key0: TypeAliasId ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a type alias.
source§

fn priv_impl_alias_semantic_data( &self, key0: ImplAliasId ) -> Result<ImplAliasData, DiagnosticAdded>

Private query to compute data about a type alias.
source§

fn impl_alias_semantic_diagnostics( &self, key0: ImplAliasId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a type alias.
source§

fn impl_alias_resolved_impl( &self, key0: ImplAliasId ) -> Result<ImplId, DiagnosticAdded>

Returns the resolved type of a type alias.
source§

fn impl_alias_generic_params( &self, key0: ImplAliasId ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic parameters of a type alias.
source§

fn impl_alias_generic_params_data( &self, key0: ImplAliasId ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic parameters data of a type alias.
source§

fn impl_alias_resolver_data( &self, key0: ImplAliasId ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a type alias.
source§

fn trait_semantic_declaration_diagnostics( &self, key0: TraitId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic declaration diagnostics of a trait.
source§

fn trait_generic_params( &self, key0: TraitId ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic parameters of a trait.
source§

fn trait_generic_params_data( &self, key0: TraitId ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic parameters data of a trait.
source§

fn trait_attributes( &self, key0: TraitId ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes of a trait.
source§

fn trait_function_asts( &self, key0: TraitId ) -> Result<OrderedHashMap<TraitFunctionId, TraitItemFunction>, DiagnosticAdded>

Returns the asts of the functions of a trait.
source§

fn trait_resolver_data( &self, key0: TraitId ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a trait.
source§

fn priv_trait_semantic_declaration_data( &self, key0: TraitId ) -> Result<TraitDeclarationData, DiagnosticAdded>

Private query to compute declaration data about a trait.
source§

fn trait_semantic_definition_diagnostics( &self, key0: TraitId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic definition diagnostics of a trait.
source§

fn trait_functions( &self, key0: TraitId ) -> Result<OrderedHashMap<SmolStr, TraitFunctionId>, DiagnosticAdded>

Returns the functions of a trait.
source§

fn trait_function_by_name( &self, key0: TraitId, key1: SmolStr ) -> Result<Option<TraitFunctionId>, DiagnosticAdded>

Returns the function with the given name of the given trait, if exists.
source§

fn priv_trait_semantic_definition_data( &self, key0: TraitId ) -> Result<TraitDefinitionData, DiagnosticAdded>

Private query to compute definition data about a trait.
source§

fn trait_function_declaration_diagnostics( &self, key0: TraitFunctionId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a trait function.
source§

fn trait_function_signature( &self, key0: TraitFunctionId ) -> Result<Signature, DiagnosticAdded>

Returns the signature of a trait function.
source§

fn trait_function_generic_params( &self, key0: TraitFunctionId ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic params of a trait function.
source§

fn trait_function_generic_params_data( &self, key0: TraitFunctionId ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic params data of a trait function.
source§

fn trait_function_attributes( &self, key0: TraitFunctionId ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes of a trait function.
source§

fn trait_function_resolver_data( &self, key0: TraitFunctionId ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a trait function.
source§

fn trait_function_declaration_inline_config( &self, key0: TraitFunctionId ) -> Result<InlineConfiguration, DiagnosticAdded>

Returns the inline configuration of a trait function’s declaration.
source§

fn trait_function_declaration_implicit_precedence( &self, key0: TraitFunctionId ) -> Result<ImplicitPrecedence, DiagnosticAdded>

Returns the implicits precedence of a trait function.
source§

fn trait_function_declaration_implicits( &self, key0: TraitFunctionId ) -> Result<Vec<TypeId>, DiagnosticAdded>

Returns the explicit implicits of a signature of a trait function.
source§

fn priv_trait_function_declaration_data( &self, key0: TraitFunctionId ) -> Result<FunctionDeclarationData, DiagnosticAdded>

Private query to compute data about a trait function declaration.
source§

fn trait_function_body_diagnostics( &self, key0: TraitFunctionId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a trait function definition (declaration + body).
source§

fn trait_function_body( &self, key0: TraitFunctionId ) -> Result<Option<Arc<FunctionBody>>, DiagnosticAdded>

Returns the body of a trait function, if any.
source§

fn priv_trait_function_body_data( &self, key0: TraitFunctionId ) -> Result<Option<FunctionBodyData>, DiagnosticAdded>

Private query to compute data about a trait function definition (declaration + body)
source§

fn concrete_trait_function_generic_params( &self, key0: ConcreteTraitGenericFunctionId ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic params of a concrete trait function.
source§

fn concrete_trait_function_signature( &self, key0: ConcreteTraitGenericFunctionId ) -> Result<Signature, DiagnosticAdded>

Returns the signature of a concrete trait function.
source§

fn module_impl_ids_for_trait_filter( &self, key0: ModuleId, key1: TraitFilter ) -> Result<Vec<UninferredImpl>, DiagnosticAdded>

Returns candidate ImplDefIds for a specific trait lookup constraint.
source§

fn canonic_trait_solutions( &self, key0: CanonicalTrait, key1: ImplLookupContext ) -> Result<SolutionSet<CanonicalImpl>, InferenceError>

source§

fn impl_semantic_declaration_diagnostics( &self, key0: ImplDefId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic declaration diagnostics of an impl.
source§

fn impl_def_functions_asts( &self, key0: ImplDefId ) -> Result<OrderedHashMap<ImplFunctionId, FunctionWithBody>, DiagnosticAdded>

Returns asts of the functions of an impl.
source§

fn impl_def_generic_params_data( &self, key0: ImplDefId ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic parameters data of an impl.
source§

fn impl_def_generic_params( &self, key0: ImplDefId ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic parameters of an impl.
source§

fn impl_def_resolver_data( &self, key0: ImplDefId ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of an impl.
source§

fn impl_def_concrete_trait( &self, key0: ImplDefId ) -> Result<ConcreteTraitId, DiagnosticAdded>

Returns the concrete trait that is implemented by the impl.
source§

fn impl_def_attributes( &self, key0: ImplDefId ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes attached to the impl.
source§

fn impl_concrete_trait( &self, key0: ImplId ) -> Result<ConcreteTraitId, DiagnosticAdded>

Returns the concrete trait that is implemented by the concrete impl.
source§

fn impl_def_trait(&self, key0: ImplDefId) -> Result<TraitId, DiagnosticAdded>

Returns the trait that is implemented by the impl.
source§

fn priv_impl_declaration_data( &self, key0: ImplDefId ) -> Result<ImplDeclarationData, DiagnosticAdded>

Private query to compute declaration data about an impl.
source§

fn impl_semantic_definition_diagnostics( &self, key0: ImplDefId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic definition diagnostics of an impl.
source§

fn impl_functions( &self, key0: ImplDefId ) -> Result<OrderedHashMap<SmolStr, ImplFunctionId>, DiagnosticAdded>

Returns the functions in the impl.
source§

fn impl_function_by_trait_function( &self, key0: ImplDefId, key1: TraitFunctionId ) -> Result<Option<ImplFunctionId>, DiagnosticAdded>

Returns the impl function that matches the given trait function, if exists. Note that a function that doesn’t exist in the impl doesn’t necessarily indicate an error, as, e.g., a trait function that has a default implementation doesn’t have to be implemented in the impl.
source§

fn priv_impl_definition_data( &self, key0: ImplDefId ) -> Result<ImplDefinitionData, DiagnosticAdded>

Private query to compute definition data about an impl.
source§

fn impl_function_declaration_diagnostics( &self, key0: ImplFunctionId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of an impl function’s declaration (signature).
source§

fn impl_function_signature( &self, key0: ImplFunctionId ) -> Result<Signature, DiagnosticAdded>

Returns the signature of an impl function.
source§

fn impl_function_generic_params( &self, key0: ImplFunctionId ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic params of an impl function.
source§

fn impl_function_generic_params_data( &self, key0: ImplFunctionId ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic params data of an impl function.
source§

fn impl_function_attributes( &self, key0: ImplFunctionId ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes of an impl function.
source§

fn impl_function_resolver_data( &self, key0: ImplFunctionId ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of an impl function’s declaration.
source§

fn impl_function_declaration_inline_config( &self, key0: ImplFunctionId ) -> Result<InlineConfiguration, DiagnosticAdded>

Returns the inline configuration of an impl function’s declaration.
source§

fn impl_function_declaration_implicit_precedence( &self, key0: ImplFunctionId ) -> Result<ImplicitPrecedence, DiagnosticAdded>

Returns the implicits precedence of an impl function.
source§

fn impl_function_declaration_implicits( &self, key0: ImplFunctionId ) -> Result<Vec<TypeId>, DiagnosticAdded>

Returns the explicit implicits of a signature of an impl function.
source§

fn impl_function_trait_function( &self, key0: ImplFunctionId ) -> Result<TraitFunctionId, DiagnosticAdded>

Returns the trait function of an impl function.
source§

fn priv_impl_function_declaration_data( &self, key0: ImplFunctionId ) -> Result<ImplFunctionDeclarationData, DiagnosticAdded>

Private query to compute data about an impl function declaration.
source§

fn impl_function_body_diagnostics( &self, key0: ImplFunctionId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of an impl function definition (declaration + body).
source§

fn impl_function_body( &self, key0: ImplFunctionId ) -> Result<Arc<FunctionBody>, DiagnosticAdded>

Returns the definition of an impl function.
source§

fn impl_function_body_resolver_data( &self, key0: ImplFunctionId ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of an impl function’s definition.
source§

fn priv_impl_function_body_data( &self, key0: ImplFunctionId ) -> Result<FunctionBodyData, DiagnosticAdded>

Private query to compute data about an impl function definition (declaration + body)
source§

fn free_function_declaration_diagnostics( &self, key0: FreeFunctionId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a free function’s declaration (signature).
source§

fn free_function_signature( &self, key0: FreeFunctionId ) -> Result<Signature, DiagnosticAdded>

Returns the signature of a free function.
source§

fn free_function_declaration_implicits( &self, key0: FreeFunctionId ) -> Result<Vec<TypeId>, DiagnosticAdded>

Returns the explicit implicits of a signature of a free function.
source§

fn free_function_declaration_implicit_precedence( &self, key0: FreeFunctionId ) -> Result<ImplicitPrecedence, DiagnosticAdded>

Returns the implicits precedence of a free function.
source§

fn free_function_generic_params( &self, key0: FreeFunctionId ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic params of a free function.
source§

fn free_function_generic_params_data( &self, key0: FreeFunctionId ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic params data of a free function.
source§

fn free_function_declaration_resolver_data( &self, key0: FreeFunctionId ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a free function’s declaration.
source§

fn free_function_declaration_inline_config( &self, key0: FreeFunctionId ) -> Result<InlineConfiguration, DiagnosticAdded>

Returns the inline configuration of a free function’s declaration.
source§

fn priv_free_function_declaration_data( &self, key0: FreeFunctionId ) -> Result<FunctionDeclarationData, DiagnosticAdded>

Private query to compute data about a free function declaration - its signature excluding its body.
source§

fn free_function_body_diagnostics( &self, key0: FreeFunctionId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a free function’s body.
source§

fn free_function_body_resolver_data( &self, key0: FreeFunctionId ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of a free function’s body.
source§

fn priv_free_function_body_data( &self, key0: FreeFunctionId ) -> Result<FunctionBodyData, DiagnosticAdded>

Private query to compute data about a free function’s body.
source§

fn function_declaration_diagnostics( &self, key0: FunctionWithBodyId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a declaration (signature) of a function with a body.
source§

fn function_declaration_inline_config( &self, key0: FunctionWithBodyId ) -> Result<InlineConfiguration, DiagnosticAdded>

Returns the inline configuration of a declaration (signature) of a function with a body.
source§

fn function_declaration_implicit_precedence( &self, key0: FunctionWithBodyId ) -> Result<ImplicitPrecedence, DiagnosticAdded>

Returns the implicit order of a declaration (signature) of a function with a body.
source§

fn function_with_body_signature( &self, key0: FunctionWithBodyId ) -> Result<Signature, DiagnosticAdded>

Returns the signature of a function with a body.
source§

fn function_with_body_generic_params( &self, key0: FunctionWithBodyId ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns all the available generic params inside a function body.
source§

fn function_with_body_attributes( &self, key0: FunctionWithBodyId ) -> Result<Vec<Attribute>, DiagnosticAdded>

Returns the attributes of a function with a body.
source§

fn function_body_diagnostics( &self, key0: FunctionWithBodyId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a body of a function (with a body).
source§

fn function_body_expr( &self, key0: FunctionWithBodyId ) -> Result<Id<Expr>, DiagnosticAdded>

Returns the body expr of a function (with a body).
source§

fn function_body( &self, key0: FunctionWithBodyId ) -> Result<Arc<FunctionBody>, DiagnosticAdded>

Returns the body of a function (with a body).
source§

fn priv_extern_function_declaration_data( &self, key0: ExternFunctionId ) -> Result<FunctionDeclarationData, DiagnosticAdded>

Private query to compute data about an extern function declaration. An extern function has no body, and thus only has a declaration.
source§

fn extern_function_declaration_inline_config( &self, key0: ExternFunctionId ) -> Result<InlineConfiguration, DiagnosticAdded>

Returns the inline configuration of an extern function’s declaration.
source§

fn extern_function_declaration_diagnostics( &self, key0: ExternFunctionId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of an extern function declaration. An extern function has no body, and thus only has a declaration.
source§

fn extern_function_signature( &self, key0: ExternFunctionId ) -> Result<Signature, DiagnosticAdded>

Returns the signature of an extern function.
source§

fn extern_function_declaration_generic_params( &self, key0: ExternFunctionId ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic params of an extern function.
source§

fn extern_function_declaration_generic_params_data( &self, key0: ExternFunctionId ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic params data of an extern function.
source§

fn extern_function_declaration_implicits( &self, key0: ExternFunctionId ) -> Result<Vec<TypeId>, DiagnosticAdded>

Returns the explicit implicits of an extern function declaration.
source§

fn extern_function_declaration_refs( &self, key0: ExternFunctionId ) -> Result<Vec<Parameter>, DiagnosticAdded>

Returns the ref parameters of an extern function declaration.
source§

fn extern_function_declaration_resolver_data( &self, key0: ExternFunctionId ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolution resolved_items of an extern function.
source§

fn priv_extern_type_declaration_data( &self, key0: ExternTypeId ) -> Result<ExternTypeDeclarationData, DiagnosticAdded>

Private query to compute data about an extern type declaration. An extern type has no body, and thus only has a declaration.
source§

fn extern_type_declaration_diagnostics( &self, key0: ExternTypeId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of an extern type declaration. An extern type has no body, and thus only has a declaration.
source§

fn extern_type_declaration_generic_params( &self, key0: ExternTypeId ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic params of an extern type.
source§

fn extern_type_declaration_generic_params_data( &self, key0: ExternTypeId ) -> Result<GenericParamsData, DiagnosticAdded>

Returns the generic params data of an extern type.
source§

fn function_title_signature( &self, key0: FunctionTitleId ) -> Result<Signature, DiagnosticAdded>

Returns the signature of the given FunctionTitleId. This include free functions, extern functions, etc…
source§

fn function_title_generic_params( &self, key0: FunctionTitleId ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic parameters of the given FunctionTitleId. This include free functions, extern functions, etc…
source§

fn concrete_function_signature( &self, key0: FunctionId ) -> Result<Signature, DiagnosticAdded>

Returns the signature of a concrete function. This include free functions, extern functions, etc…
source§

fn generic_type_generic_params( &self, key0: GenericTypeId ) -> Result<Vec<GenericParam>, DiagnosticAdded>

Returns the generic params of a generic type.
source§

fn generic_param_data( &self, key0: GenericParamId ) -> Result<GenericParamData, DiagnosticAdded>

Query to compute data about a generic param.
source§

fn generic_param_semantic( &self, key0: GenericParamId ) -> Result<GenericParam, DiagnosticAdded>

Returns the semantic data of a generic param.
source§

fn generic_param_diagnostics( &self, key0: GenericParamId ) -> Diagnostics<SemanticDiagnostic>

Returns the semantic diagnostics of a generic param.
source§

fn generic_param_resolver_data( &self, key0: GenericParamId ) -> Result<Arc<ResolverData>, DiagnosticAdded>

Returns the resolver data of a generic param.
source§

fn generic_impl_param_trait( &self, key0: GenericParamId ) -> Result<TraitId, DiagnosticAdded>

Returns the trait a generic param impl should implement.
source§

fn type_info( &self, key0: ImplLookupContext, key1: TypeId ) -> Result<TypeInfo, DiagnosticAdded>

Returns the generic_type of a generic function. This include free types, extern types, etc…
source§

fn expr_semantic(&self, key0: FunctionWithBodyId, key1: Id<Expr>) -> Expr

Assumes function and expression are present.
source§

fn statement_semantic( &self, key0: FunctionWithBodyId, key1: Id<Statement> ) -> Statement

Assumes function and statement are valid.
source§

fn lookup_resolved_generic_item_by_ptr( &self, key0: LookupItemId, key1: TerminalIdentifierPtr ) -> Option<ResolvedGenericItem>

source§

fn lookup_resolved_concrete_item_by_ptr( &self, key0: LookupItemId, key1: TerminalIdentifierPtr ) -> Option<ResolvedConcreteItem>

source§

fn module_semantic_diagnostics( &self, key0: ModuleId ) -> Result<Diagnostics<SemanticDiagnostic>, DiagnosticAdded>

Aggregates module level semantic diagnostics.
source§

fn file_semantic_diagnostics( &self, key0: FileId ) -> Result<Diagnostics<SemanticDiagnostic>, DiagnosticAdded>

Aggregates file level semantic diagnostics.
source§

fn core_crate(&self) -> CrateId

source§

fn core_module(&self) -> ModuleId

source§

fn core_felt252_ty(&self) -> TypeId

source§

fn semantic_plugins(&self) -> Vec<Arc<dyn SemanticPlugin>>

source§

fn set_semantic_plugins(&mut self, value__: Vec<Arc<dyn SemanticPlugin>>)

Set the value of the semantic_plugins input. Read more
source§

fn set_semantic_plugins_with_durability( &mut self, value__: Vec<Arc<dyn SemanticPlugin>>, durability__: Durability )

Set the value of the semantic_plugins input and promise that its value will never change again. Read more
source§

fn methods_in_module( &self, key0: ModuleId, key1: TypeFilter ) -> Vec<TraitFunctionId>

Returns all methods in a module that match the given type filter.
source§

fn methods_in_crate( &self, key0: CrateId, key1: TypeFilter ) -> Vec<TraitFunctionId>

Returns all methods in a crate that match the given type filter.
source§

impl<'a, T> SemanticGroupEx<'a> for Twhere T: Upcast<dyn SemanticGroup + 'a> + ?Sized,

source§

impl<T0, T1, E, TRewriter> SemanticRewriter<(T0, T1), E> for TRewriterwhere TRewriter: SemanticRewriter<T0, E> + SemanticRewriter<T1, E>,

source§

fn rewrite(&mut self, value: (T0, T1)) -> Result<(T0, T1), E>

source§

impl<T, E, TRewriter> SemanticRewriter<Box<T>, E> for TRewriterwhere T: Clone, TRewriter: SemanticRewriter<T, E>,

source§

fn rewrite(&mut self, value: Box<T>) -> Result<Box<T>, E>

source§

impl<T, E, TRewriter> SemanticRewriter<Option<T>, E> for TRewriterwhere TRewriter: SemanticRewriter<T, E>,

source§

fn rewrite(&mut self, value: Option<T>) -> Result<Option<T>, E>

source§

impl<T, E, TRewriter, E2> SemanticRewriter<Result<T, E2>, E> for TRewriterwhere TRewriter: SemanticRewriter<T, E>,

source§

fn rewrite(&mut self, value: Result<T, E2>) -> Result<Result<T, E2>, E>

source§

impl<T, E, TRewriter> SemanticRewriter<Vec<T>, E> for TRewriterwhere TRewriter: SemanticRewriter<T, E>,

source§

fn rewrite(&mut self, value: Vec<T>) -> Result<Vec<T>, E>

source§

impl<'a, T> SemanticStructEx<'a> for Twhere T: Upcast<dyn SemanticGroup + 'a> + ?Sized,

source§

impl<'a, T> SemanticUseEx<'a> for Twhere T: Upcast<dyn SemanticGroup + 'a> + ?Sized,

source§

fn use_resolved_item( &self, use_id: UseId ) -> Result<ResolvedGenericItem, DiagnosticAdded>

Returns the resolved items. Read more
source§

impl<DB> SierraGenGroup for DBwhere DB: LoweringGroup + Upcast<dyn LoweringGroup> + Database + HasQueryGroup<SierraGenDatabase>,

source§

fn intern_label_id(&self, key0: LabelLongId) -> LabelId

source§

fn lookup_intern_label_id(&self, key0: LabelId) -> LabelLongId

source§

fn intern_concrete_lib_func( &self, key0: ConcreteLibfuncLongId ) -> ConcreteLibfuncId

source§

fn lookup_intern_concrete_lib_func( &self, key0: ConcreteLibfuncId ) -> ConcreteLibfuncLongId

source§

fn intern_concrete_type( &self, key0: SierraGeneratorTypeLongId ) -> ConcreteTypeId

source§

fn lookup_intern_concrete_type( &self, key0: ConcreteTypeId ) -> SierraGeneratorTypeLongId

source§

fn intern_sierra_function(&self, key0: FunctionId) -> FunctionId

Creates a Sierra function id for a function id of the semantic model.
source§

fn lookup_intern_sierra_function(&self, key0: FunctionId) -> FunctionId

source§

fn get_concrete_type_id( &self, key0: TypeId ) -> Result<ConcreteTypeId, DiagnosticAdded>

Returns the matching sierra concrete type id for a given semantic type id.
source§

fn get_concrete_long_type_id( &self, key0: TypeId ) -> Result<Arc<ConcreteTypeLongId>, DiagnosticAdded>

Returns the matching sierra concrete type long id for a given semantic type id.
source§

fn is_self_referential(&self, key0: TypeId) -> Result<bool, DiagnosticAdded>

Returns if the semantic id has a circular definition.
source§

fn type_dependencies( &self, key0: TypeId ) -> Result<Arc<Vec<TypeId>>, DiagnosticAdded>

Returns the semantic type ids the type is directly dependent on.
source§

fn get_function_signature( &self, key0: FunctionId ) -> Result<Arc<FunctionSignature>, DiagnosticAdded>

Returns the cairo_lang_sierra::program::FunctionSignature object for the given function id.
source§

fn get_type_info( &self, key0: ConcreteTypeId ) -> Result<Arc<TypeInfo>, DiagnosticAdded>

Returns the cairo_lang_sierra::extensions::types::TypeInfo object for the given type id.
source§

fn priv_function_with_body_sierra_data( &self, key0: ConcreteFunctionWithBodyId ) -> SierraFunctionWithBodyData

Private query to compute Sierra data about a function with body.
source§

fn function_with_body_sierra( &self, key0: ConcreteFunctionWithBodyId ) -> Result<Arc<Function>, DiagnosticAdded>

Returns the Sierra code (as pre_sierra::Function) for a given function with body.
source§

fn get_ap_change( &self, key0: ConcreteFunctionWithBodyId ) -> Result<SierraApChange, DiagnosticAdded>

Returns the ap change of a given function if it is known at compile time or SierraApChange::Unknown otherwise.
source§

fn get_sierra_program_for_functions( &self, key0: Vec<ConcreteFunctionWithBodyId> ) -> Result<Arc<Program>, DiagnosticAdded>

Returns the cairo_lang_sierra::program::Program object of the requested functions.
source§

fn get_sierra_program( &self, key0: Vec<CrateId> ) -> Result<Arc<Program>, DiagnosticAdded>

Returns the cairo_lang_sierra::program::Program object of the requested crates.
source§

impl<DB> SyntaxGroup for DBwhere DB: FilesGroup + Upcast<dyn FilesGroup> + Database + HasQueryGroup<SyntaxDatabase>,

source§

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

§

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 Twhere U: TryFrom<T>,

§

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.
source§

impl<T> Upcast<T> for Twhere T: ?Sized,

source§

fn upcast(&self) -> &T

source§

impl<T> UpcastMut<T> for Twhere T: ?Sized,

source§

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