RootDatabase

Struct RootDatabase 

Source
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 Clone for RootDatabase

Source§

fn clone(&self) -> RootDatabase

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Database for RootDatabase

Source§

fn trigger_lru_eviction(&mut self)

Enforces current LRU limits, evicting entries if necessary. Read more
Source§

fn synthetic_write(&mut self, durability: Durability)

A “synthetic write” causes the system to act as though some input of durability durability has changed, triggering a new revision. This is mostly useful for profiling scenarios. Read more
Source§

fn trigger_cancellation(&mut self)

This method triggers cancellation. If you invoke it while a snapshot exists, it will block until that snapshot is dropped – if that snapshot is owned by the current thread, this could trigger deadlock.
Source§

fn report_untracked_read(&self)

Reports that the query depends on some state unknown to salsa. Read more
Source§

fn ingredient_debug_name( &self, ingredient_index: IngredientIndex, ) -> Cow<'_, str>

Return the “debug name” (i.e., the struct name, etc) for an “ingredient”, which are the fine-grained components we use to track data. This is intended for debugging and the contents of the returned string are not semver-guaranteed. Read more
Source§

fn unwind_if_revision_cancelled(&self)

Starts unwinding the stack if the current revision is cancelled. Read more
Source§

fn attach<R>(&self, op: impl FnOnce(&Self) -> R) -> R
where Self: Sized,

Execute op with the database in thread-local storage for debug print-outs.
Source§

impl Default for RootDatabase

Source§

fn default() -> Self

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

impl HasStorage for RootDatabase

Source§

fn storage(&self) -> &Storage<Self>

Source§

fn storage_mut(&mut self) -> &mut Storage<Self>

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<'db, T> ConstantSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn constant_semantic_diagnostics( &'db self, const_id: ConstantId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

Returns the semantic diagnostics of a constant definition.
Source§

fn constant_semantic_data( &'db self, use_id: ConstantId<'db>, ) -> Result<Constant<'db>, DiagnosticAdded>

Returns the semantic data of a constant definition.
Source§

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

Returns the resolver data of a constant definition.
Source§

fn constant_const_value( &'db self, const_id: ConstantId<'db>, ) -> Result<ConstValueId<'db>, DiagnosticAdded>

Returns the const value of a constant definition.
Source§

fn const_calc_info(&'db self) -> Arc<ConstCalcInfo<'db>>

Returns information required for const calculations.
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<'db, T> CorelibSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn core_crate(&'db self) -> CrateId<'db>

Source§

fn core_module(&'db self) -> ModuleId<'db>

Source§

fn core_info(&'db self) -> Arc<CoreInfo<'db>>

Source§

impl<'db, T> DebugDbUpcast<'db, T> for T
where T: ?Sized,

Source§

impl<T> DefsGroup for T
where T: Database + ?Sized,

Source§

fn default_macro_plugins_input(&self) -> &[MacroPluginLongId]

Source§

fn macro_plugin_overrides_input( &self, ) -> &OrderedHashMap<CrateInput, Arc<[MacroPluginLongId]>>

Source§

fn inline_macro_plugin_overrides_input( &self, ) -> &OrderedHashMap<CrateInput, Arc<OrderedHashMap<String, InlineMacroExprPluginLongId>>>

Source§

fn default_inline_macro_plugins_input( &self, ) -> &OrderedHashMap<String, InlineMacroExprPluginLongId>

Source§

fn default_macro_plugins<'db>(&'db self) -> &'db [MacroPluginId<'db>]

Interned version of default_macro_plugins_input.
Source§

fn macro_plugin_overrides<'db>( &'db self, ) -> &'db OrderedHashMap<CrateId<'db>, Vec<MacroPluginId<'db>>>

Interned version of macro_plugin_overrides_input.
Source§

fn crate_macro_plugins<'db>( &'db self, crate_id: CrateId<'db>, ) -> &'db [MacroPluginId<'db>]

Returns MacroPluginIds of the plugins set for the crate with CrateId. Provides an override if it has been set with DefsGroupEx::set_override_crate_macro_plugins or the default (DefsGroup::default_macro_plugins) otherwise.
Source§

fn default_inline_macro_plugins<'db>( &'db self, ) -> &'db OrderedHashMap<String, InlineMacroExprPluginId<'db>>

Interned version of default_inline_macro_plugins_input.
Source§

fn inline_macro_plugin_overrides<'db>( &'db self, ) -> &'db OrderedHashMap<CrateId<'db>, OrderedHashMap<String, InlineMacroExprPluginId<'db>>>

Interned version of inline_macro_plugin_overrides_input.
Source§

fn crate_inline_macro_plugins<'db>( &'db self, crate_id: CrateId<'db>, ) -> &'db OrderedHashMap<String, InlineMacroExprPluginId<'db>>

Returns InlineMacroExprPluginIds of the plugins set for the crate with CrateId. Provides an override if it has been set with DefsGroupEx::set_override_crate_inline_macro_plugins or the default (DefsGroup::default_inline_macro_plugins) otherwise.
Source§

fn allowed_attributes<'db>( &'db self, crate_id: CrateId<'db>, ) -> &'db OrderedHashSet<SmolStrId<'db>>

Returns the set of attributes allowed anywhere. An attribute on any item that is not in this set will be handled as an unknown attribute.
Source§

fn allowed_statement_attributes<'db>( &'db self, ) -> &'db OrderedHashSet<SmolStrId<'db>>

Returns the set of attributes allowed on statements. An attribute on a statement that is not in this set will be handled as an unknown attribute.
Source§

fn declared_derives<'db>( &'db self, crate_id: CrateId<'db>, ) -> &'db OrderedHashSet<SmolStrId<'db>>

Returns the set of derive that were declared as by a plugin. A derive that is not in this set will be handled as an unknown derive.
Source§

fn declared_phantom_type_attributes<'db>( &'db self, crate_id: CrateId<'db>, ) -> &'db OrderedHashSet<SmolStrId<'db>>

Returns the set of attributes that were declared as phantom type attributes by a plugin, i.e. a type marked with this attribute is considered a phantom type.
Source§

fn is_submodule_inline<'db>(&self, submodule_id: SubmoduleId<'db>) -> bool

Checks whether the submodule is defined as inline.
Source§

fn module_main_file<'db>( &'db self, module_id: ModuleId<'db>, ) -> Result<FileId<'db>, DiagnosticAdded>

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

fn module_files<'db>( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db [FileId<'db>], DiagnosticAdded>

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

fn module_dir<'db>( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db Directory<'db>, DiagnosticAdded>

Gets the directory of a module.
Source§

fn crate_modules<'db>(&'db self, crate_id: CrateId<'db>) -> &'db [ModuleId<'db>]

Source§

fn file_modules<'db>( &'db self, file_id: FileId<'db>, ) -> Result<&'db [ModuleId<'db>], DiagnosticAdded>

Source§

fn cached_crate_modules<'db>( &'db self, crate_id: CrateId<'db>, ) -> Option<(Arc<OrderedHashMap<ModuleId<'db>, ModuleData<'db>>>, Arc<DefCacheLoadingData<'db>>)>

Returns the ModuleData of all modules in the crate’s cache, and the loading data of the DefsGroup in the crate.
Source§

fn module_submodules_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db [SubmoduleId<'db>], DiagnosticAdded>

Source§

fn module_constants_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db [ConstantId<'db>], DiagnosticAdded>

Source§

fn module_constant_by_id<'db>( &'db self, constant_data: ConstantId<'db>, ) -> Result<ItemConstant<'db>, DiagnosticAdded>

Source§

fn module_free_functions_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db [FreeFunctionId<'db>], DiagnosticAdded>

Source§

fn module_free_function_by_id<'db>( &'db self, free_function_id: FreeFunctionId<'db>, ) -> Result<FunctionWithBody<'db>, DiagnosticAdded>

Source§

fn module_item_name_stable_ptr<'db>( &'db self, module_id: ModuleId<'db>, item_id: ModuleItemId<'db>, ) -> Result<SyntaxStablePtrId<'db>, DiagnosticAdded>

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

fn module_uses_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db [UseId<'db>], DiagnosticAdded>

Source§

fn module_use_by_id<'db>( &'db self, use_id: UseId<'db>, ) -> Result<UsePathLeaf<'db>, DiagnosticAdded>

Source§

fn module_global_use_by_id<'db>( &'db self, global_use_id: GlobalUseId<'db>, ) -> Result<UsePathStar<'db>, DiagnosticAdded>

Source§

fn module_structs_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db [StructId<'db>], DiagnosticAdded>

Source§

fn module_struct_by_id<'db>( &'db self, struct_id: StructId<'db>, ) -> Result<ItemStruct<'db>, DiagnosticAdded>

Source§

fn module_enums_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db [EnumId<'db>], DiagnosticAdded>

Source§

fn module_enum_by_id<'db>( &'db self, enum_id: EnumId<'db>, ) -> Result<ItemEnum<'db>, DiagnosticAdded>

Source§

fn module_type_aliases_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db [ModuleTypeAliasId<'db>], DiagnosticAdded>

Source§

fn module_type_alias_by_id<'db>( &'db self, module_type_alias_id: ModuleTypeAliasId<'db>, ) -> Result<ItemTypeAlias<'db>, DiagnosticAdded>

Source§

fn module_impl_aliases_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db [ImplAliasId<'db>], DiagnosticAdded>

Source§

fn module_impl_alias_by_id<'db>( &'db self, impl_alias_id: ImplAliasId<'db>, ) -> Result<ItemImplAlias<'db>, DiagnosticAdded>

Source§

fn module_traits_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db [TraitId<'db>], DiagnosticAdded>

Source§

fn module_trait_by_id<'db>( &'db self, trait_id: TraitId<'db>, ) -> Result<ItemTrait<'db>, DiagnosticAdded>

Source§

fn module_impls_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db [ImplDefId<'db>], DiagnosticAdded>

Source§

fn module_impl_by_id<'db>( &'db self, impl_id: ImplDefId<'db>, ) -> Result<ItemImpl<'db>, DiagnosticAdded>

Source§

fn module_extern_types_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db [ExternTypeId<'db>], DiagnosticAdded>

Source§

fn module_extern_type_by_id<'db>( &'db self, extern_type_id: ExternTypeId<'db>, ) -> Result<ItemExternType<'db>, DiagnosticAdded>

Source§

fn module_extern_functions_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db [ExternFunctionId<'db>], DiagnosticAdded>

Source§

fn module_extern_function_by_id<'db>( &'db self, extern_function_id: ExternFunctionId<'db>, ) -> Result<ItemExternFunction<'db>, DiagnosticAdded>

Source§

fn module_macro_declarations_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db [MacroDeclarationId<'db>], DiagnosticAdded>

Returns the IDs of the macro declarations in the module.
Source§

fn module_macro_declaration_by_id<'db>( &'db self, macro_declaration_id: MacroDeclarationId<'db>, ) -> Result<ItemMacroDeclaration<'db>, DiagnosticAdded>

Returns the macro declaration by its ID.
Source§

fn module_macro_calls_ids<'db>( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db [MacroCallId<'db>], DiagnosticAdded>

Returns the IDs of the macro calls in the module.
Source§

fn module_macro_call_by_id<'db>( &'db self, macro_call_id: MacroCallId<'db>, ) -> Result<ItemInlineMacro<'db>, DiagnosticAdded>

Returns the macro call by its ID.
Source§

fn module_ancestors<'db>( &'db self, module_id: ModuleId<'db>, ) -> &'db OrderedHashSet<ModuleId<'db>>

Returns the ancestors of a module.
Source§

fn module_perceived_module<'db>( &'db self, module_id: ModuleId<'db>, ) -> ModuleId<'db>

Returns the module that the module is perceives as. Specifically if this is a macro call, it returns the module that the macro call was called from, including recursive calls.
Source§

impl<T> DefsGroupEx for T
where T: DefsGroup + ?Sized,

Source§

fn set_override_crate_macro_plugins<'db>( &mut self, crate_id: CrateId<'db>, plugins: Arc<Vec<MacroPluginId<'db>>>, )

Overrides the default macro plugins available for CrateId with plugins. Read more
Source§

fn set_override_crate_inline_macro_plugins<'db>( &mut self, crate_id: CrateId<'db>, plugins: Arc<OrderedHashMap<String, InlineMacroExprPluginId<'db>>>, )

Overrides the default inline macro plugins available for CrateId with plugins. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<'db, T> EnumSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn enum_declaration_diagnostics( &'db self, enum_id: EnumId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

Returns the diagnostics of an enum declaration.
Source§

fn enum_generic_params( &'db self, enum_id: EnumId<'db>, ) -> Result<&'db [GenericParam<'db>], DiagnosticAdded>

Returns the generic parameters of an enum.
Source§

fn enum_attributes( &'db self, enum_id: EnumId<'db>, ) -> Result<&'db [Attribute<'db>], DiagnosticAdded>

Returns the attributes attached to an enum.
Source§

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

Returns the resolution resolved_items of an enum declaration.
Source§

fn enum_definition_diagnostics( &'db self, enum_id: EnumId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

Returns the definition diagnostics of an enum definition.
Source§

fn enum_variants( &'db self, enum_id: EnumId<'db>, ) -> Result<&'db OrderedHashMap<SmolStrId<'db>, VariantId<'db>>, DiagnosticAdded>

Returns the members of an enum.
Source§

fn variant_semantic( &'db self, enum_id: EnumId<'db>, variant_id: VariantId<'db>, ) -> Result<Variant<'db>, DiagnosticAdded>

Returns the semantic model of a variant.
Source§

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

Returns the resolution resolved_items of an enum definition.
Source§

impl<'db, T> ExternFunctionSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn extern_function_declaration_inline_config( &'db self, extern_function_id: ExternFunctionId<'db>, ) -> Result<InlineConfiguration<'db>, DiagnosticAdded>

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

fn extern_function_declaration_diagnostics( &'db self, extern_function_id: ExternFunctionId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

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( &'db self, extern_function_id: ExternFunctionId<'db>, ) -> Result<&'db Signature<'db>, DiagnosticAdded>

Returns the signature of an extern function.
Source§

fn extern_function_declaration_generic_params( &'db self, extern_function_id: ExternFunctionId<'db>, ) -> Result<&'db [GenericParam<'db>], DiagnosticAdded>

Returns the generic params of an extern function.
Source§

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

Returns the resolution resolved_items of an extern function.
Source§

impl<'db, T> ExternTypeSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn extern_type_declaration_diagnostics( &'db self, extern_type_id: ExternTypeId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

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( &'db self, extern_type_id: ExternTypeId<'db>, ) -> Result<&'db [GenericParam<'db>], DiagnosticAdded>

Returns the generic params of an extern type.
Source§

fn extern_type_declaration_generic_params_data( &'db self, extern_type_id: ExternTypeId<'db>, ) -> Result<GenericParamsData<'db>, DiagnosticAdded>

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

fn extern_type_attributes( &'db self, extern_type_id: ExternTypeId<'db>, ) -> Result<&'db [Attribute<'db>], DiagnosticAdded>

Returns the attributes of an extern type.
Source§

impl<T> FilesGroup for T
where T: Database + ?Sized,

Source§

fn crate_configs<'db>( &'db self, ) -> &'db OrderedHashMap<CrateId<'db>, CrateConfiguration<'db>>

Interned version of crate_configs_input.
Source§

fn file_overrides<'db>(&'db self) -> &'db OrderedHashMap<FileId<'db>, ArcStr>

Interned version of file_overrides_input.
Source§

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

Interned version of flags_input.
Source§

fn crates<'db>(&'db self) -> &'db [CrateId<'db>]

List of crates in the project.
Source§

fn crate_config<'db>( &'db self, crate_id: CrateId<'db>, ) -> Option<&'db CrateConfiguration<'db>>

Configuration of the crate.
Source§

fn file_content<'db>(&'db self, file_id: FileId<'db>) -> Option<&'db str>

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

fn file_summary<'db>( &'db self, file_id: FileId<'db>, ) -> Option<&'db FileSummary>

Source§

fn blob_content<'db>(&'db self, blob_id: BlobId<'db>) -> Option<&'db [u8]>

Query for the blob content.
Source§

fn get_flag<'db>(&'db self, id: FlagId<'db>) -> Option<&'db Flag>

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

fn file_input<'db>(&'db self, file_id: FileId<'db>) -> &'db FileInput

Create an input file from an interned file id.
Source§

fn crate_input<'db>(&'db self, crt: CrateId<'db>) -> &'db CrateInput

Create an input crate from an interned crate id.
Source§

fn set_flag(&mut self, flag: FlagLongId, 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§

fn cfg_set(&self) -> &CfgSet

Returns the cfg set.
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<'db, T> FreeFunctionSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn free_function_declaration_diagnostics( &'db self, id: FreeFunctionId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

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

fn free_function_signature( &'db self, id: FreeFunctionId<'db>, ) -> Result<&'db Signature<'db>, DiagnosticAdded>

Returns the signature of a free function.
Source§

fn free_function_declaration_implicit_precedence( &'db self, id: FreeFunctionId<'db>, ) -> Result<&'db ImplicitPrecedence<'db>, DiagnosticAdded>

Returns the implicits precedence of a free function.
Source§

fn free_function_generic_params( &'db self, id: FreeFunctionId<'db>, ) -> Result<&'db [GenericParam<'db>], DiagnosticAdded>

Returns the generic params of a free function.
Source§

fn free_function_attributes( &'db self, id: FreeFunctionId<'db>, ) -> Result<&'db [Attribute<'db>], DiagnosticAdded>

Returns the attributes of a free function.
Source§

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

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

fn free_function_declaration_inline_config( &'db self, id: FreeFunctionId<'db>, ) -> Result<InlineConfiguration<'db>, DiagnosticAdded>

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

fn free_function_body_diagnostics( &'db self, id: FreeFunctionId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

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

fn free_function_body( &'db self, id: FreeFunctionId<'db>, ) -> Result<&'db FunctionBody<'db>, DiagnosticAdded>

Returns the definition of a free function.
Source§

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

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

fn priv_free_function_body_data( &'db self, id: FreeFunctionId<'db>, ) -> Result<&'db FunctionBodyData<'db>, DiagnosticAdded>

Returns the semantic body of a free function.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'db, T> FunctionImplicitsTrait<'db> for T
where T: Database + ?Sized,

Source§

fn function_with_body_implicits( &'db self, function: ConcreteFunctionWithBodyId<'db>, ) -> Result<Vec<TypeId<'db>>, DiagnosticAdded>

Returns all the implicits used by a ConcreteFunctionWithBodyId.
Source§

impl<'db, T> FunctionWithBodySemantic<'db> for T
where T: Database + ?Sized,

Source§

fn function_declaration_diagnostics( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

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

fn function_declaration_inline_config( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Result<InlineConfiguration<'db>, DiagnosticAdded>

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

fn function_declaration_implicit_precedence( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Result<&'db ImplicitPrecedence<'db>, DiagnosticAdded>

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

fn function_with_body_signature( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Result<&'db Signature<'db>, DiagnosticAdded>

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

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

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

fn function_with_body_attributes( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Result<&'db [Attribute<'db>], DiagnosticAdded>

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

fn function_body_diagnostics( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

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

fn function_body( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Result<&'db FunctionBody<'db>, DiagnosticAdded>

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

fn function_body_expr( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Result<ExprId, DiagnosticAdded>

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

fn expr_semantic( &'db self, function_id: FunctionWithBodyId<'db>, id: ExprId, ) -> Expr<'db>

Assumes function and expression are present.
Source§

fn statement_semantic( &'db self, function_id: FunctionWithBodyId<'db>, id: StatementId, ) -> Statement<'db>

Assumes function and statement are valid.
Source§

fn pattern_semantic( &'db self, function_id: FunctionWithBodyId<'db>, id: PatternId, ) -> Pattern<'db>

Assumes function and pattern are present.
Source§

impl<'db, T> FunctionsSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn function_title_signature( &'db self, function_title_id: FunctionTitleId<'db>, ) -> Result<&'db Signature<'db>, DiagnosticAdded>

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

fn function_title_generic_params( &'db self, function_title_id: FunctionTitleId<'db>, ) -> Result<&'db [GenericParam<'db>], DiagnosticAdded>

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

fn concrete_function_signature( &'db self, function_id: FunctionId<'db>, ) -> Result<&'db Signature<'db>, DiagnosticAdded>

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

fn concrete_function_closure_params( &'db self, function_id: FunctionId<'db>, ) -> Result<OrderedHashMap<TypeId<'db>, TypeId<'db>>, DiagnosticAdded>

Returns a mapping of closure types to their associated parameter types for a concrete function.
Source§

fn get_closure_params( &'db self, generic_function_id: GenericFunctionId<'db>, ) -> Result<OrderedHashMap<TypeId<'db>, TypeId<'db>>, DiagnosticAdded>

Returns a mapping of closure types to their associated parameter types for a generic function.
Source§

impl<'db, T> GenericParamSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn generic_param_semantic( &'db self, generic_param: GenericParamId<'db>, ) -> Result<GenericParam<'db>, DiagnosticAdded>

Returns the semantic data of a generic param.
Source§

fn generic_param_diagnostics( &'db self, generic_param: GenericParamId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

Returns the semantic diagnostics of a generic param.
Source§

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

Returns the resolver data of a generic param.
Source§

fn generic_impl_param_trait( &'db self, generic_param_id: GenericParamId<'db>, ) -> Result<TraitId<'db>, DiagnosticAdded>

Returns the trait a generic param impl should implement. Panics if the generic param is not an impl generic param.
Source§

fn generic_impl_param_shallow_trait_generic_args( &'db self, generic_param: GenericParamId<'db>, ) -> Result<&'db [(GenericParamId<'db>, ShallowGenericArg<'db>)], DiagnosticAdded>

Returns the shallow generic args of a generic impl param.
Source§

fn generic_params_type_constraints( &'db self, generic_params: Vec<GenericParamId<'db>>, ) -> &'db [(TypeId<'db>, TypeId<'db>)]

Returns the type constraints introduced by the generic params.
Source§

impl<'db, T> ImplAliasSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn impl_alias_impl_def( &'db self, id: ImplAliasId<'db>, ) -> Result<ImplDefId<'db>, DiagnosticAdded>

Returns the impl definition pointed to by the impl alias, or an error if it points to something else.
Source§

fn impl_alias_semantic_diagnostics( &'db self, id: ImplAliasId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

Returns the semantic diagnostics of a type alias.
Source§

fn impl_alias_resolved_impl( &'db self, id: ImplAliasId<'db>, ) -> Result<ImplId<'db>, DiagnosticAdded>

Returns the resolved type of a type alias.
Source§

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

Returns the generic parameters of a type alias.
Source§

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

Returns the resolution resolved_items of a type alias.
Source§

fn impl_alias_attributes( &'db self, id: ImplAliasId<'db>, ) -> Result<&'db [Attribute<'db>], DiagnosticAdded>

Returns the attributes attached to the impl alias.
Source§

impl<'db, T> ImplSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn impl_semantic_declaration_diagnostics( &'db self, impl_def_id: ImplDefId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

Returns the semantic declaration diagnostics of an impl.
Source§

fn impl_def_generic_params( &'db self, impl_def_id: ImplDefId<'db>, ) -> Result<&'db [GenericParam<'db>], DiagnosticAdded>

Returns the generic parameters of an impl.
Source§

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

Returns the resolution resolved_items of an impl.
Source§

fn impl_def_concrete_trait( &'db self, impl_def_id: ImplDefId<'db>, ) -> Result<ConcreteTraitId<'db>, DiagnosticAdded>

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

fn impl_def_attributes( &'db self, impl_def_id: ImplDefId<'db>, ) -> Result<&'db [Attribute<'db>], DiagnosticAdded>

Returns the attributes attached to the impl.
Source§

fn impl_concrete_trait( &'db self, impl_id: ImplId<'db>, ) -> Result<ConcreteTraitId<'db>, DiagnosticAdded>

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

fn impl_def_trait( &'db self, impl_def_id: ImplDefId<'db>, ) -> Result<TraitId<'db>, DiagnosticAdded>

Returns the trait that is implemented by the impl, or an error if the RHS of the of is not a trait.
Source§

fn impl_semantic_definition_diagnostics( &'db self, impl_def_id: ImplDefId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

Returns the semantic definition diagnostics of an impl.
Source§

fn impl_item_info_by_name( &'db self, impl_def_id: ImplDefId<'db>, name: SmolStrId<'db>, ) -> Result<Option<ImplItemInfo<'db>>, DiagnosticAdded>

Returns the metadata for an impl item, by the given name, if exists.
Source§

fn impl_all_used_uses( &'db self, impl_def_id: ImplDefId<'db>, ) -> Result<&'db OrderedHashSet<UseId<'db>>, DiagnosticAdded>

Returns all the items used within the impl.
Source§

fn impl_types( &'db self, impl_def_id: ImplDefId<'db>, ) -> Result<&'db OrderedHashMap<ImplTypeDefId<'db>, ItemTypeAlias<'db>>, DiagnosticAdded>

Returns the type items in the impl.
Source§

fn impl_type_by_trait_type( &'db self, impl_def_id: ImplDefId<'db>, trait_type_id: TraitTypeId<'db>, ) -> Result<ImplTypeDefId<'db>, DiagnosticAdded>

Returns the impl type item that matches the given trait type item, if exists.
Source§

fn impl_constants( &'db self, impl_def_id: ImplDefId<'db>, ) -> Result<&'db OrderedHashMap<ImplConstantDefId<'db>, ItemConstant<'db>>, DiagnosticAdded>

Returns the constant items in the impl.
Source§

fn impl_functions( &'db self, impl_def_id: ImplDefId<'db>, ) -> Result<&'db OrderedHashMap<SmolStrId<'db>, ImplFunctionId<'db>>, DiagnosticAdded>

Returns the functions in the impl.
Source§

fn impl_type_def_resolved_type( &'db self, id: ImplTypeDefId<'db>, ) -> Result<TypeId<'db>, DiagnosticAdded>

Returns the resolved type of an impl item type.
Source§

fn impl_type_def_generic_params( &'db self, id: ImplTypeDefId<'db>, ) -> Result<Vec<GenericParam<'db>>, DiagnosticAdded>

Returns the generic parameters of an impl item type.
Source§

fn impl_type_def_attributes( &'db self, id: ImplTypeDefId<'db>, ) -> Result<&'db [Attribute<'db>], DiagnosticAdded>

Returns the attributes of an impl type.
Source§

fn impl_type_def_resolver_data( &'db self, id: ImplTypeDefId<'db>, ) -> Result<Arc<ResolverData<'db>>, DiagnosticAdded>

Returns the resolution resolved_items of an impl item type.
Source§

fn deref_chain( &'db self, ty: TypeId<'db>, crate_id: CrateId<'db>, try_deref_mut: bool, ) -> Result<&'db DerefChain<'db>, DiagnosticAdded>

Returns the deref chain and diagnostics for a given type.
Source§

fn impl_type_concrete_implized( &'db self, impl_type_def_id: ImplTypeId<'db>, ) -> Result<TypeId<'db>, DiagnosticAdded>

Returns the implized impl type if the impl is concrete. Returns a TypeId that’s not an impl type with a concrete impl.
Source§

fn impl_constant_def_value( &'db self, id: ImplConstantDefId<'db>, ) -> Result<ConstValueId<'db>, DiagnosticAdded>

Returns the resolved constant value of an impl item constant.
Source§

fn impl_constant_def_resolver_data( &'db self, id: ImplConstantDefId<'db>, ) -> Result<Arc<ResolverData<'db>>, DiagnosticAdded>

Returns the resolution resolved_items of an impl item constant.
Source§

fn impl_constant_concrete_implized_value( &'db self, impl_constant_id: ImplConstantId<'db>, ) -> Result<ConstValueId<'db>, DiagnosticAdded>

Returns the implized impl constant value if the impl is concrete.
Source§

fn impl_constant_concrete_implized_type( &'db self, impl_constant_id: ImplConstantId<'db>, ) -> Result<TypeId<'db>, DiagnosticAdded>

Returns the implized impl constant type if the impl is concrete.
Source§

fn impl_impl_def_resolver_data( &'db self, id: ImplImplDefId<'db>, ) -> Result<Arc<ResolverData<'db>>, DiagnosticAdded>

Returns the resolution resolved_items of an impl item impl.
Source§

fn impl_impl_concrete_implized( &'db self, impl_impl_id: ImplImplId<'db>, ) -> Result<ImplId<'db>, DiagnosticAdded>

Returns the implized impl impl value if the impl is concrete.
Source§

fn impl_function_declaration_diagnostics( &'db self, id: ImplFunctionId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

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

fn impl_function_signature( &'db self, id: ImplFunctionId<'db>, ) -> Result<&'db Signature<'db>, DiagnosticAdded>

Returns the signature of an impl function.
Source§

fn impl_function_generic_params( &'db self, id: ImplFunctionId<'db>, ) -> Result<&'db [GenericParam<'db>], DiagnosticAdded>

Returns the generic params of an impl function.
Source§

fn impl_function_attributes( &'db self, id: ImplFunctionId<'db>, ) -> Result<&'db [Attribute<'db>], DiagnosticAdded>

Returns the attributes of an impl function.
Source§

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

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

fn impl_function_declaration_inline_config( &'db self, id: ImplFunctionId<'db>, ) -> Result<InlineConfiguration<'db>, DiagnosticAdded>

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

fn impl_function_declaration_implicit_precedence( &'db self, id: ImplFunctionId<'db>, ) -> Result<&'db ImplicitPrecedence<'db>, DiagnosticAdded>

Returns the implicits precedence of an impl function.
Source§

fn impl_function_trait_function( &'db self, id: ImplFunctionId<'db>, ) -> Result<TraitFunctionId<'db>, DiagnosticAdded>

Returns the trait function of an impl function.
Source§

fn impl_function_body_diagnostics( &'db self, impl_function_id: ImplFunctionId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

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

fn impl_function_body( &'db self, impl_function_id: ImplFunctionId<'db>, ) -> Result<&'db FunctionBody<'db>, DiagnosticAdded>

Returns the definition of an impl function.
Source§

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

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

fn priv_impl_function_body_data( &'db self, impl_function_id: ImplFunctionId<'db>, ) -> Result<&'db FunctionBodyData<'db>, DiagnosticAdded>

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

impl<'db, T> ImplizationSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn trait_type_implized_by_context( &'db self, trait_type_def_id: TraitTypeId<'db>, impl_def_id: ImplDefId<'db>, ) -> Result<TypeId<'db>, DiagnosticAdded>

Returns the impl type for the given trait type, by implization by the given impl context, if the impl matches the trait of the trait type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

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

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

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

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

impl<T> LoweringGroup for T
where T: Database + ?Sized,

Source§

fn priv_function_with_body_multi_lowering<'db>( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Result<&'db MultiLowering<'db>, DiagnosticAdded>

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

fn cached_multi_lowerings<'db>( &'db self, crate_id: CrateId<'db>, ) -> Option<&'db OrderedHashMap<FunctionWithBodyId<'db>, MultiLowering<'db>>>

Returns a mapping from function ids to their multi-lowerings for the given loaded from a cache for the given crate.
Source§

fn function_with_body_lowering<'db>( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Result<&'db Lowered<'db>, DiagnosticAdded>

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

fn borrow_check<'db>( &'db self, function_id: FunctionWithBodyId<'db>, ) -> Result<&'db BorrowCheckResult<'db>, DiagnosticAdded>

Computes the borrow check result of a function.
Source§

fn lowered_body<'db>( &'db self, function_id: ConcreteFunctionWithBodyId<'db>, stage: LoweringStage, ) -> Result<&'db Lowered<'db>, DiagnosticAdded>

Computes the lowered representation of a function at the requested lowering stage.
Source§

fn lowered_direct_callees<'db>( &'db self, function_id: ConcreteFunctionWithBodyId<'db>, dependency_type: DependencyType, stage: LoweringStage, ) -> Result<&'db [FunctionId<'db>], DiagnosticAdded>

Returns the set of direct callees which are functions with body of a concrete function with a body (i.e. excluding libfunc callees), at the given stage.
Source§

fn lowered_direct_callees_with_body<'db>( &'db self, function_id: ConcreteFunctionWithBodyId<'db>, dependency_type: DependencyType, stage: LoweringStage, ) -> Result<&'db [ConcreteFunctionWithBodyId<'db>], DiagnosticAdded>

Returns the set of direct callees which are functions with body of a concrete function with a body (i.e. excluding libfunc callees), at the given stage.
Source§

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

Aggregates function level lowering diagnostics.
Source§

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

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

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

Aggregates module level lowering diagnostics.
Source§

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

Aggregates file level lowering diagnostics.
Source§

fn function_implicits<'db>( &'db self, function: FunctionId<'db>, ) -> Result<Vec<TypeId<'db>>, 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 function_may_panic<'db>( &'db self, function: FunctionId<'db>, ) -> Result<bool, DiagnosticAdded>

Returns whether the function may panic.
Source§

fn has_direct_panic<'db>( &'db self, function_id: ConcreteFunctionWithBodyId<'db>, ) -> Result<bool, DiagnosticAdded>

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

fn function_with_body_direct_callees<'db>( &'db self, function_id: FunctionWithBodyId<'db>, dependency_type: DependencyType, ) -> Result<&'db OrderedHashSet<FunctionId<'db>>, DiagnosticAdded>

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

fn function_with_body_direct_function_with_body_callees<'db>( &'db self, function_id: FunctionWithBodyId<'db>, dependency_type: DependencyType, ) -> Result<&'db OrderedHashSet<FunctionWithBodyId<'db>>, 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 final_contains_call_cycle<'db>( &'db self, function_id: ConcreteFunctionWithBodyId<'db>, ) -> Result<bool, DiagnosticAdded>

Returns true if the function (in its final lowering representation) 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::final_contains_call_cycle will return true for all of these functions.
Source§

fn in_cycle<'db>( &'db self, function_id: FunctionWithBodyId<'db>, dependency_type: DependencyType, ) -> 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_in_cycle<'db>( &'db self, function_id: ConcreteFunctionWithBodyId<'db>, dependency_type: DependencyType, stage: LoweringStage, ) -> Result<bool, DiagnosticAdded>

A concrete version of in_cycle.
Source§

fn lowered_scc_representative<'db>( &'db self, function: ConcreteFunctionWithBodyId<'db>, dependency_type: DependencyType, stage: LoweringStage, ) -> ConcreteSCCRepresentative<'db>

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 lowered_scc<'db>( &'db self, function_id: ConcreteFunctionWithBodyId<'db>, dependency_type: DependencyType, stage: LoweringStage, ) -> Vec<ConcreteFunctionWithBodyId<'db>>

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

fn function_with_body_scc<'db>( &'db self, function_id: FunctionWithBodyId<'db>, dependency_type: DependencyType, ) -> &'db [FunctionWithBodyId<'db>]

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

fn function_with_body_feedback_set<'db>( &'db self, function: ConcreteFunctionWithBodyId<'db>, stage: LoweringStage, ) -> Result<&'db OrderedHashSet<ConcreteFunctionWithBodyId<'db>>, 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<'db>( &'db self, function: ConcreteFunctionWithBodyId<'db>, ) -> Result<bool, DiagnosticAdded>

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

fn priv_movable_function_ids<'db>( &'db self, ) -> &'db UnorderedHashSet<ExternFunctionId<'db>>

Internal query for reorder_statements to cache the function ids that can be moved.
Source§

fn priv_should_inline<'db>( &'db self, function_id: ConcreteFunctionWithBodyId<'db>, ) -> Result<bool, DiagnosticAdded>

Source§

fn priv_never_inline<'db>( &'db self, function_id: ConcreteFunctionWithBodyId<'db>, ) -> Result<bool, DiagnosticAdded>

Source§

fn priv_should_specialize<'db>( &'db self, function_id: ConcreteFunctionWithBodyId<'db>, ) -> Result<bool, DiagnosticAdded>

Returns whether a function should be specialized.
Source§

fn optimization_config(&self) -> &OptimizationConfig

Returns the configuration struct that controls the behavior of the optimization passes.
Source§

fn final_optimization_strategy<'db>(&'db self) -> OptimizationStrategyId<'db>

Returns the final optimization strategy that is applied on top of inlined_function_optimization_strategy.
Source§

fn baseline_optimization_strategy<'db>(&'db self) -> OptimizationStrategyId<'db>

Returns the baseline optimization strategy. This strategy is used for inlining decision and as a starting point for the final lowering.
Source§

fn type_size<'db>(&'db self, ty: TypeId<'db>) -> usize

Returns the expected size of a type.
Source§

fn estimate_size<'db>( &'db self, function_id: ConcreteFunctionWithBodyId<'db>, ) -> Result<isize, DiagnosticAdded>

Returns the estimated size of the function with the given id.
Source§

impl<'db, T> LspHelpers<'db> for T
where T: Database + ?Sized,

Source§

fn methods_in_module( &'db self, module_id: ModuleId<'db>, type_filter: TypeFilter<'db>, ) -> Arc<Vec<TraitFunctionId<'db>>>

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

fn methods_in_crate( &'db self, crate_id: CrateId<'db>, type_filter: TypeFilter<'db>, ) -> Arc<Vec<TraitFunctionId<'db>>>

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

fn visible_importables_from_module( &'db self, module_id: ModuleId<'db>, ) -> Option<Arc<OrderedHashMap<ImportableId<'db>, String>>>

Returns all the importables visible from a module, alongside a visible use path to the trait.
Source§

fn visible_importables_in_module( &'db self, module_id: ModuleId<'db>, user_module_id: ModuleId<'db>, include_parent: bool, ) -> Arc<Vec<(ImportableId<'db>, String)>>

Returns all visible importables in a module, alongside a visible use path to the trait. user_module_id is the module from which the importables should be visible. If include_parent is true, the parent module of module_id is also considered.
Source§

fn visible_importables_in_crate( &'db self, crate_id: CrateId<'db>, user_module_id: ModuleId<'db>, ) -> Arc<Vec<(ImportableId<'db>, String)>>

Returns all visible importables in a crate, alongside a visible use path to the trait. user_module_id is the module from which the importables should be visible.
Source§

fn visible_traits_from_module( &'db self, module_id: ModuleId<'db>, ) -> Option<Arc<OrderedHashMap<TraitId<'db>, String>>>

Returns all the traits visible from a module, alongside a visible use path to the trait.
Source§

fn inline_macro_expansion_files( &'db self, module_id: ModuleId<'db>, ) -> &'db Vec<FileId<'db>>

Returns all files generated by inline macro expansion inside provided module.
Source§

fn accumulate_inline_macro_expansion(&'db self, file: &FileLongId<'db>)

Marks file as result of inline macro expansion.
Source§

impl<'db, T> MacroCallSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn priv_macro_call_data( &'db self, macro_call_id: MacroCallId<'db>, ) -> Result<MacroCallData<'db>, DiagnosticAdded>

Returns the semantic data of a macro call.
Source§

fn macro_call_module_id( &'db self, macro_call_id: MacroCallId<'db>, ) -> Result<ModuleId<'db>, DiagnosticAdded>

Returns the expansion result of a macro call.
Source§

fn macro_call_diagnostics( &'db self, macro_call_id: MacroCallId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

Returns the semantic diagnostics of a macro call.
Source§

impl<'db, T> MacroDeclarationSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn priv_macro_declaration_data( &'db self, macro_id: MacroDeclarationId<'db>, ) -> Result<MacroDeclarationData<'db>, DiagnosticAdded>

Private query to compute data about a macro declaration.
Source§

fn macro_declaration_diagnostics( &'db self, macro_id: MacroDeclarationId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

Returns the semantic diagnostics of a macro declaration.
Source§

fn macro_declaration_resolver_data( &'db self, macro_id: MacroDeclarationId<'db>, ) -> Result<Arc<ResolverData<'db>>, DiagnosticAdded>

Returns the resolver data of a macro declaration.
Source§

fn macro_declaration_attributes( &'db self, macro_id: MacroDeclarationId<'db>, ) -> Result<Vec<Attribute<'db>>, DiagnosticAdded>

Returns the attributes of a macro declaration.
Source§

fn macro_declaration_rules( &'db self, macro_id: MacroDeclarationId<'db>, ) -> Result<Vec<MacroRuleData<'db>>, DiagnosticAdded>

Returns the rules semantic data of a macro declaration.
Source§

impl<'db, T> MayPanicTrait<'db> for T
where T: Database + ?Sized,

Source§

impl<'db, T> ModuleSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn priv_module_semantic_data( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db ModuleSemanticData<'db>, DiagnosticAdded>

Private query to compute data about the module.
Source§

fn module_item_by_name( &'db self, module_id: ModuleId<'db>, name: SmolStrId<'db>, ) -> Result<Option<ModuleItemId<'db>>, DiagnosticAdded>

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

fn module_item_info_by_name( &'db self, module_id: ModuleId<'db>, name: SmolStrId<'db>, ) -> Result<Option<ModuleItemInfo<'db>>, DiagnosticAdded>

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

fn module_all_used_uses( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db OrderedHashSet<UseId<'db>>, DiagnosticAdded>

Returns all the items used within the module.
Source§

fn module_attributes( &'db self, module_id: ModuleId<'db>, ) -> Result<&'db [Attribute<'db>], DiagnosticAdded>

Returns the attributes of a module.
Source§

fn module_usable_trait_ids( &'db self, module_id: ModuleId<'db>, ) -> &'db OrderedHashMap<TraitId<'db>, LookupItemId<'db>>

Finds all the trait ids usable in the module.
Source§

impl<'db, T> ModuleTypeAliasSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn module_type_alias_semantic_diagnostics( &'db self, id: ModuleTypeAliasId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

Returns the semantic diagnostics of a type alias.
Source§

fn module_type_alias_resolved_type( &'db self, id: ModuleTypeAliasId<'db>, ) -> Result<TypeId<'db>, DiagnosticAdded>

Returns the resolved type of a type alias.
Source§

fn module_type_alias_generic_params( &'db self, id: ModuleTypeAliasId<'db>, ) -> Result<Vec<GenericParam<'db>>, DiagnosticAdded>

Returns the generic parameters of a type alias.
Source§

fn module_type_alias_resolver_data( &'db self, id: ModuleTypeAliasId<'db>, ) -> Result<Arc<ResolverData<'db>>, DiagnosticAdded>

Returns the resolution resolved_items of a type alias.
Source§

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

Source§

fn fg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the foreground set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like red() and green(), which have the same functionality but are pithier.

§Example

Set foreground color to white using fg():

use yansi::{Paint, Color};

painted.fg(Color::White);

Set foreground color to white using white().

use yansi::Paint;

painted.white();
Source§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
Source§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
Source§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
Source§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
Source§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
Source§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
Source§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
Source§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
Source§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
Source§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
Source§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
Source§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
Source§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
Source§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
Source§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
Source§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
Source§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
Source§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
Source§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
Source§

fn bg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the background set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like on_red() and on_green(), which have the same functionality but are pithier.

§Example

Set background color to red using fg():

use yansi::{Paint, Color};

painted.bg(Color::Red);

Set background color to red using on_red().

use yansi::Paint;

painted.on_red();
Source§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
Source§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
Source§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
Source§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
Source§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
Source§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
Source§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
Source§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
Source§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
Source§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
Source§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
Source§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
Source§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
Source§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
Source§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
Source§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
Source§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
Source§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
Source§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
Source§

fn attr(&self, value: Attribute) -> Painted<&T>

Enables the styling Attribute value.

This method should be used rarely. Instead, prefer to use attribute-specific builder methods like bold() and underline(), which have the same functionality but are pithier.

§Example

Make text bold using attr():

use yansi::{Paint, Attribute};

painted.attr(Attribute::Bold);

Make text bold using using bold().

use yansi::Paint;

painted.bold();
Source§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
Source§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
Source§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
Source§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
Source§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
Source§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
Source§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
Source§

fn quirk(&self, value: Quirk) -> Painted<&T>

Enables the yansi Quirk value.

This method should be used rarely. Instead, prefer to use quirk-specific builder methods like mask() and wrap(), which have the same functionality but are pithier.

§Example

Enable wrapping using .quirk():

use yansi::{Paint, Quirk};

painted.quirk(Quirk::Wrap);

Enable wrapping using wrap().

use yansi::Paint;

painted.wrap();
Source§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
Source§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
Source§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
Source§

fn clear(&self) -> Painted<&T>

👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
Source§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
Source§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
Source§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
Source§

fn whenever(&self, value: Condition) -> Painted<&T>

Conditionally enable styling based on whether the Condition value applies. Replaces any previous condition.

See the crate level docs for more details.

§Example

Enable styling painted only when both stdout and stderr are TTYs:

use yansi::{Paint, Condition};

painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);
Source§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new Painted with a default Style. Read more
Source§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
Source§

impl<T> ParserGroup for T
where T: Database + ?Sized,

Source§

fn file_syntax<'db>( &'db self, file_id: FileId<'db>, ) -> Result<SyntaxNode<'db>, DiagnosticAdded>

Parses a file and returns its AST as a root SyntaxNode.
Source§

fn file_module_syntax<'db>( &'db self, file_id: FileId<'db>, ) -> Result<SyntaxFile<'db>, DiagnosticAdded>

Parses a file and returns its AST as a root SyntaxFile.
Source§

fn file_expr_syntax<'db>( &'db self, file_id: FileId<'db>, ) -> Result<Expr<'db>, DiagnosticAdded>

Parses a file and returns its AST as an expression. Only used for inline macros expanded code.
Source§

fn file_statement_list_syntax<'db>( &'db self, file_id: FileId<'db>, ) -> Result<StatementList<'db>, DiagnosticAdded>

Parses a file and returns its AST as a list of statements. Only used for inline macros expanded code.
Source§

fn file_syntax_diagnostics<'db>( &'db self, file_id: FileId<'db>, ) -> &'db Diagnostics<'db, ParserDiagnostic<'db>>

Returns the parser diagnostics for this file.
Source§

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

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> PluginSuiteInput for T
where T: Database + ?Sized,

Source§

fn intern_plugin_suite<'r>( &'r mut self, suite: PluginSuite, ) -> InternedPluginSuite<'r>

Interns each plugin from the PluginSuite into the database.
Source§

fn set_default_plugins_from_suite(&mut self, suite: PluginSuite)

Sets macro, inline macro and analyzer plugins specified in the PluginSuite as default for all crates. Read more
Source§

fn set_override_crate_plugins_from_suite( &mut self, crate_id: CrateId<'_>, suite: InternedPluginSuite<'_>, )

Sets macro, inline macro and analyzer plugins present in the PluginSuite for a crate pointed to by the CrateId, overriding the defaults for that crate. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<'db, T> PrivTypesSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn priv_type_is_fully_concrete(&self, ty: TypeId<'db>) -> bool

Private query to check if a type is fully concrete.
Source§

fn priv_type_is_var_free(&self, ty: TypeId<'db>) -> bool

Private query to check if a type contains no variables.
Source§

fn priv_type_short_name(&self, ty: TypeId<'db>) -> String

Private query for a shorter unique name for types.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SemanticEnumEx for T
where T: Database + ?Sized,

Source§

fn concrete_enum_variant<'db>( &'db self, concrete_enum_id: ConcreteEnumId<'db>, variant: &Variant<'db>, ) -> Result<ConcreteVariant<'db>, DiagnosticAdded>

Retrieves the ConcreteVariant for a ConcreteEnumId and a Variant.
Source§

fn concrete_enum_variants<'db>( &'db self, concrete_enum_id: ConcreteEnumId<'db>, ) -> Result<Vec<ConcreteVariant<'db>>, DiagnosticAdded>

Retrieves all the ConcreteVariants for a ConcreteEnumId.
Source§

impl<'db, T> SemanticExprLookup<'db> for T
where T: Database + ?Sized,

Source§

fn lookup_expr_by_ptr( &'db self, function_id: FunctionWithBodyId<'db>, ptr: ExprPtr<'db>, ) -> Result<ExprId, DiagnosticAdded>

Source§

fn lookup_pattern_by_ptr( &'db self, function_id: FunctionWithBodyId<'db>, ptr: PatternPtr<'db>, ) -> Result<PatternId, DiagnosticAdded>

Source§

impl<T> SemanticGroup for T
where T: Database + ?Sized,

Source§

fn lookup_resolved_generic_item_by_ptr<'db>( &'db self, id: LookupItemId<'db>, ptr: TerminalIdentifierPtr<'db>, ) -> Option<ResolvedGenericItem<'db>>

Source§

fn lookup_resolved_concrete_item_by_ptr<'db>( &'db self, id: LookupItemId<'db>, ptr: TerminalIdentifierPtr<'db>, ) -> Option<ResolvedConcreteItem<'db>>

Source§

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

Aggregates module level semantic diagnostics.
Source§

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

Aggregates file level semantic diagnostics.
Source§

fn default_analyzer_plugins_input(&self) -> &[AnalyzerPluginLongId]

Source§

fn default_analyzer_plugins<'db>(&'db self) -> Arc<Vec<AnalyzerPluginId<'db>>>

Interned version of default_analyzer_plugins.
Source§

fn analyzer_plugin_overrides_input( &self, ) -> &OrderedHashMap<CrateInput, Arc<[AnalyzerPluginLongId]>>

Source§

fn analyzer_plugin_overrides<'db>( &'db self, ) -> Arc<OrderedHashMap<CrateId<'db>, Arc<Vec<AnalyzerPluginId<'db>>>>>

Interned version of analyzer_plugin_overrides_input.
Source§

fn crate_analyzer_plugins<'db>( &'db self, crate_id: CrateId<'db>, ) -> Arc<Vec<AnalyzerPluginId<'db>>>

Returns AnalyzerPluginIds of the plugins set for the crate with CrateId. Returns SemanticGroupEx::set_override_crate_analyzer_plugins if it has been set, or the (SemanticGroup::default_analyzer_plugins) otherwise.
Source§

fn declared_allows<'db>( &self, crate_id: CrateId<'db>, ) -> Arc<OrderedHashSet<String>>

Returns the set of allow that were declared as by a plugin. An allow that is not in this set will be handled as an unknown allow.
Source§

fn cached_crate_semantic_data<'db>( &'db self, crate_id: CrateId<'db>, ) -> Option<ModuleSemanticDataCacheAndLoadingData<'db>>

Returns the ModuleSemanticData of all modules in the crate’s cache, and the loading data of the SemanticGroup in the crate.
Source§

impl<T> SemanticGroupEx for T
where T: Database + ?Sized,

Source§

fn set_override_crate_analyzer_plugins( &mut self, crate_id: CrateId<'_>, plugins: Arc<[AnalyzerPluginId<'_>]>, )

Overrides the default analyzer plugins available for CrateId with plugins. Read more
Source§

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

Source§

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

Source§

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

Source§

impl<T, E, TRewriter> SemanticRewriter<Box<T>, E> for TRewriter
where TRewriter: SemanticRewriter<T, E>,

Source§

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

Source§

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

Source§

impl<T, E, TRewriter> SemanticRewriter<Deque<T>, E> for TRewriter
where TRewriter: SemanticRewriter<T, E>,

Source§

fn internal_rewrite(&mut self, value: &mut Deque<T>) -> Result<RewriteResult, E>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<'a, K, V, E, TRewriter> SemanticRewriter<OrderedHashMap<K, V>, E> for TRewriter
where K: Hash + Eq + LanguageElementId<'a>, V: Clone, TRewriter: SemanticRewriter<V, E>,

Source§

fn internal_rewrite( &mut self, value: &mut OrderedHashMap<K, V>, ) -> Result<RewriteResult, E>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<T, E, TRewriter> SemanticRewriter<Vec<T>, E> for TRewriter
where T: Clone, TRewriter: SemanticRewriter<T, E>,

Source§

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

Source§

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

Source§

impl<'db, T> SemanticSolver<'db> for T
where T: Database + ?Sized,

Source§

fn canonic_trait_solutions( &'db self, canonical_trait: CanonicalTrait<'db>, lookup_context: ImplLookupContextId<'db>, impl_type_bounds: BTreeMap<ImplTypeById<'db>, TypeId<'db>>, ) -> Result<SolutionSet<'db, CanonicalImpl<'db>>, InferenceError<'db>>

Returns the solution set for a canonical trait.
Source§

impl<'a, T> SemanticUseEx<'a> for T
where T: Database + ?Sized,

Source§

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

Returns the resolved item or an error if it can’t be resolved. Read more
Source§

impl<T> SierraGenGroup for T
where T: Database + ?Sized,

Source§

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

Source§

fn lookup_concrete_lib_func( &self, id: &ConcreteLibfuncId, ) -> ConcreteLibfuncLongId

Source§

fn intern_concrete_type<'db>( &'db self, id: SierraGeneratorTypeLongId<'db>, ) -> ConcreteTypeId

Source§

fn lookup_concrete_type<'db>( &'db self, id: &ConcreteTypeId, ) -> SierraGeneratorTypeLongId<'db>

Source§

fn intern_sierra_function<'db>(&'db self, id: FunctionId<'db>) -> FunctionId

Creates a Sierra function id for a lowering function id.
Source§

fn lookup_sierra_function<'db>(&'db self, id: &FunctionId) -> FunctionId<'db>

Source§

fn get_concrete_type_id<'db>( &'db self, type_id: TypeId<'db>, ) -> Result<&'db ConcreteTypeId, DiagnosticAdded>

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

fn get_index_enum_type_id( &self, index_count: usize, ) -> Result<&ConcreteTypeId, DiagnosticAdded>

Returns the ConcreteTypeId of the index enum type with the given index count.
Source§

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

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

fn is_self_referential<'db>( &self, type_id: TypeId<'db>, ) -> Result<bool, DiagnosticAdded>

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

fn type_dependencies<'db>( &'db self, type_id: TypeId<'db>, ) -> Result<&'db [TypeId<'db>], DiagnosticAdded>

Returns the semantic type ids the type is directly dependent on. Read more
Source§

fn has_in_deps<'db>( &self, type_id: TypeId<'db>, needle: TypeId<'db>, ) -> Result<bool, DiagnosticAdded>

Source§

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

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

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

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

fn priv_function_with_body_sierra_data<'db>( &'db self, function_id: ConcreteFunctionWithBodyId<'db>, ) -> Result<&'db SierraFunctionWithBodyData<'db>, DiagnosticAdded>

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

fn function_with_body_sierra<'db>( &'db self, function_id: ConcreteFunctionWithBodyId<'db>, ) -> Result<&'db Function<'db>, DiagnosticAdded>

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

fn priv_get_dummy_function<'db>( &'db self, function_id: ConcreteFunctionWithBodyId<'db>, ) -> Result<&'db Function<'db>, DiagnosticAdded>

Private query to generate a dummy function for a given function with body.
Source§

fn get_ap_change<'db>( &self, function_id: ConcreteFunctionWithBodyId<'db>, ) -> Result<SierraApChange, DiagnosticAdded>

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

fn priv_libfunc_dependencies( &self, libfunc_id: ConcreteLibfuncId, ) -> &[ConcreteTypeId]

Private query to returns the type dependencies of a given libfunc.
Source§

fn get_sierra_program_for_functions<'db>( &'db self, requested_function_ids: Vec<ConcreteFunctionWithBodyId<'db>>, ) -> Result<&'db SierraProgramWithDebug<'db>, DiagnosticAdded>

Returns the SierraProgramWithDebug object of the requested functions.
Source§

fn get_sierra_program<'db>( &'db self, requested_crate_ids: Vec<CrateId<'db>>, ) -> Result<&'db SierraProgramWithDebug<'db>, DiagnosticAdded>

Returns the SierraProgramWithDebug object of the requested crates.
Source§

impl<'db, T> StructSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn struct_declaration_diagnostics( &'db self, struct_id: StructId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

Returns the declaration diagnostics of a struct.
Source§

fn struct_generic_params( &'db self, struct_id: StructId<'db>, ) -> Result<&'db [GenericParam<'db>], DiagnosticAdded>

Returns the generic parameters of a struct.
Source§

fn struct_attributes( &'db self, struct_id: StructId<'db>, ) -> Result<&'db [Attribute<'db>], DiagnosticAdded>

Returns the attributes attached to a struct.
Source§

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

Returns the resolution resolved_items of a struct declaration.
Source§

fn struct_definition_diagnostics( &'db self, struct_id: StructId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

Returns the definition diagnostics of a struct definition.
Source§

fn struct_members( &'db self, struct_id: StructId<'db>, ) -> Result<&'db OrderedHashMap<SmolStrId<'db>, Member<'db>>, DiagnosticAdded>

Returns the members of a struct.
Source§

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

Returns the resolution resolved_items of a struct definition.
Source§

fn concrete_struct_members( &'db self, concrete_struct_id: ConcreteStructId<'db>, ) -> Result<&'db OrderedHashMap<SmolStrId<'db>, Member<'db>>, DiagnosticAdded>

Returns the concrete members of a struct.
Source§

impl<T> SyntaxGroup for T
where T: Database + ?Sized,

Source§

fn get_children<'db>(&'db self, node: SyntaxNode<'db>) -> &'db [SyntaxNode<'db>]

Query for caching SyntaxNode::get_children.
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<'db, T> TraitSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn trait_semantic_declaration_diagnostics( &'db self, trait_id: TraitId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

Returns the semantic declaration diagnostics of a trait.
Source§

fn trait_generic_params( &'db self, trait_id: TraitId<'db>, ) -> Result<&'db [GenericParam<'db>], DiagnosticAdded>

Returns the generic parameters of a trait.
Source§

fn trait_generic_params_ids( &'db self, trait_id: TraitId<'db>, ) -> Result<&'db [GenericParamId<'db>], DiagnosticAdded>

Returns the ids of the generic parameters of a trait.
Source§

fn trait_attributes( &'db self, trait_id: TraitId<'db>, ) -> Result<&'db [Attribute<'db>], DiagnosticAdded>

Returns the attributes of a trait.
Source§

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

Returns the resolution resolved_items of a trait.
Source§

fn trait_semantic_definition_diagnostics( &'db self, trait_id: TraitId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

Returns the semantic definition diagnostics of a trait.
Source§

fn trait_required_item_names( &'db self, trait_id: TraitId<'db>, ) -> Result<&'db OrderedHashSet<SmolStrId<'db>>, DiagnosticAdded>

Returns the names of all the non default implemented items of a trait.
Source§

fn trait_item_by_name( &'db self, trait_id: TraitId<'db>, name: SmolStrId<'db>, ) -> Result<Option<TraitItemId<'db>>, DiagnosticAdded>

Returns the item of the trait, by the given name, if exists.
Source§

fn trait_item_info_by_name( &'db self, trait_id: TraitId<'db>, name: SmolStrId<'db>, ) -> Result<Option<TraitItemInfo<'db>>, DiagnosticAdded>

Returns the metadata for a trait item, by the given name, if exists.
Source§

fn trait_all_used_uses( &'db self, trait_id: TraitId<'db>, ) -> Result<&'db OrderedHashSet<UseId<'db>>, DiagnosticAdded>

Returns all the items used within the trait.
Source§

fn trait_functions( &'db self, trait_id: TraitId<'db>, ) -> Result<&'db OrderedHashMap<SmolStrId<'db>, TraitFunctionId<'db>>, DiagnosticAdded>

Returns the functions of a trait.
Source§

fn trait_function_by_name( &'db self, trait_id: TraitId<'db>, name: SmolStrId<'db>, ) -> Result<Option<TraitFunctionId<'db>>, DiagnosticAdded>

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

fn trait_types( &'db self, trait_id: TraitId<'db>, ) -> Result<&'db OrderedHashMap<SmolStrId<'db>, TraitTypeId<'db>>, DiagnosticAdded>

Returns the types of a trait.
Source§

fn trait_type_by_name( &'db self, trait_id: TraitId<'db>, name: SmolStrId<'db>, ) -> Result<Option<TraitTypeId<'db>>, DiagnosticAdded>

Returns the item type with the given name of the given trait, if exists.
Source§

fn trait_constants( &'db self, trait_id: TraitId<'db>, ) -> Result<&'db OrderedHashMap<SmolStrId<'db>, TraitConstantId<'db>>, DiagnosticAdded>

Returns the constants of a trait.
Source§

fn trait_constant_by_name( &'db self, trait_id: TraitId<'db>, name: SmolStrId<'db>, ) -> Result<Option<TraitConstantId<'db>>, DiagnosticAdded>

Returns the item constants with the given name of the given trait, if exists.
Source§

fn trait_impls( &'db self, trait_id: TraitId<'db>, ) -> Result<&'db OrderedHashMap<SmolStrId<'db>, TraitImplId<'db>>, DiagnosticAdded>

Returns the constants of a trait.
Source§

fn trait_impl_by_name( &'db self, trait_id: TraitId<'db>, name: SmolStrId<'db>, ) -> Result<Option<TraitImplId<'db>>, DiagnosticAdded>

Returns the item impls with the given name of the given trait, if exists.
Source§

fn trait_type_generic_params( &'db self, trait_type_id: TraitTypeId<'db>, ) -> Result<&'db [GenericParam<'db>], DiagnosticAdded>

Returns the generic params of a trait type.
Source§

fn trait_type_attributes( &'db self, trait_type_id: TraitTypeId<'db>, ) -> Result<&'db [Attribute<'db>], DiagnosticAdded>

Returns the attributes of a trait type.
Source§

fn trait_type_resolver_data( &'db self, trait_type_id: TraitTypeId<'db>, ) -> Result<Arc<ResolverData<'db>>, DiagnosticAdded>

Returns the resolution resolved_items of a trait type.
Source§

fn trait_constant_attributes( &'db self, id: TraitConstantId<'db>, ) -> Result<Vec<Attribute<'db>>, DiagnosticAdded>

Returns the attributes of a trait constants.
Source§

fn trait_constant_type( &'db self, id: TraitConstantId<'db>, ) -> Result<TypeId<'db>, DiagnosticAdded>

Returns the type of a trait constant.
Source§

fn trait_constant_resolver_data( &'db self, id: TraitConstantId<'db>, ) -> Result<Arc<ResolverData<'db>>, DiagnosticAdded>

Returns the resolution resolved_items of a trait constants.
Source§

fn concrete_trait_constant_type( &'db self, concrete_trait_constant_id: ConcreteTraitConstantId<'db>, ) -> Result<TypeId<'db>, DiagnosticAdded>

Returns the type of a trait constant.
Source§

fn trait_impl_concrete_trait( &'db self, id: TraitImplId<'db>, ) -> Result<ConcreteTraitId<'db>, DiagnosticAdded>

Returns the concrete trait of a trait impl.
Source§

fn trait_impl_resolver_data( &'db self, id: TraitImplId<'db>, ) -> Result<Arc<ResolverData<'db>>, DiagnosticAdded>

Returns the resolution resolved_items of a trait impls.
Source§

fn concrete_trait_impl_concrete_trait( &'db self, concrete_trait_impl_id: ConcreteTraitImplId<'db>, ) -> Result<ConcreteTraitId<'db>, DiagnosticAdded>

Returns the concrete trait of a concrete trait impl.
Source§

fn trait_function_declaration_diagnostics( &'db self, trait_function_id: TraitFunctionId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

Returns the semantic diagnostics of a trait function.
Source§

fn trait_function_signature( &'db self, trait_function_id: TraitFunctionId<'db>, ) -> Result<&'db Signature<'db>, DiagnosticAdded>

Returns the signature of a trait function.
Source§

fn trait_function_generic_params( &'db self, trait_function_id: TraitFunctionId<'db>, ) -> Result<&'db [GenericParam<'db>], DiagnosticAdded>

Returns the generic params of a trait function.
Source§

fn trait_function_attributes( &'db self, trait_function_id: TraitFunctionId<'db>, ) -> Result<&'db [Attribute<'db>], DiagnosticAdded>

Returns the attributes of a trait function.
Source§

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

Returns the resolver data of a trait function.
Source§

fn trait_function_declaration_inline_config( &'db self, trait_function_id: TraitFunctionId<'db>, ) -> Result<InlineConfiguration<'db>, DiagnosticAdded>

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

fn trait_function_declaration_implicit_precedence( &'db self, trait_function_id: TraitFunctionId<'db>, ) -> Result<&'db ImplicitPrecedence<'db>, DiagnosticAdded>

Returns the implicits precedence of a trait function.
Source§

fn trait_function_body_diagnostics( &'db self, trait_function_id: TraitFunctionId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

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

fn trait_function_body( &'db self, trait_function_id: TraitFunctionId<'db>, ) -> Result<Option<&'db FunctionBody<'db>>, DiagnosticAdded>

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

fn trait_function_body_resolver_data( &'db self, trait_function_id: TraitFunctionId<'db>, ) -> Result<Option<Arc<ResolverData<'db>>>, DiagnosticAdded>

Returns the resolution resolved_items of a trait function.
Source§

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

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

fn concrete_trait_function_generic_params( &'db self, concrete_trait_function_id: ConcreteTraitGenericFunctionId<'db>, ) -> Result<&'db [GenericParam<'db>], DiagnosticAdded>

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

fn concrete_trait_function_signature( &'db self, concrete_trait_function_id: ConcreteTraitGenericFunctionId<'db>, ) -> Result<&'db Signature<'db>, DiagnosticAdded>

Returns the signature of a concrete trait function.
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.
Source§

impl<'db, T> TypesSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn generic_type_generic_params( &'db self, generic_type: GenericTypeId<'db>, ) -> Result<&'db [GenericParam<'db>], DiagnosticAdded>

Returns the generic params of a generic type.
Source§

fn single_value_type( &'db self, ty: TypeId<'db>, ) -> Result<bool, DiagnosticAdded>

Returns true if there is only one value for the given type and hence the values of the given type are all interchangeable. Examples include the unit type tuple of a unit type and empty structs. Always returns false for extern types.
Source§

fn type_size_info( &'db self, ty: TypeId<'db>, ) -> Result<TypeSizeInformation, DiagnosticAdded>

Returns the type size information for the given type.
Source§

fn type_info( &'db self, lookup_context: ImplLookupContextId<'db>, ty: TypeId<'db>, ) -> TypeInfo<'db>

Returns the type info for a type in a context.
Source§

fn copyable( &'db self, ty: TypeId<'db>, ) -> Result<ImplId<'db>, InferenceError<'db>>

Returns the Copy impl for a type in general context.
Source§

fn droppable( &'db self, ty: TypeId<'db>, ) -> Result<ImplId<'db>, InferenceError<'db>>

Returns the Drop impl for a type in general context.
Source§

impl<'db, T> UseSemantic<'db> for T
where T: Database + ?Sized,

Source§

fn priv_use_semantic_data( &'db self, use_id: UseId<'db>, ) -> Result<Arc<UseData<'db>>, DiagnosticAdded>

Private query to compute data about a use.
Source§

fn use_semantic_diagnostics( &'db self, use_id: UseId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

Returns the semantic diagnostics of a use.
Source§

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

Returns the resolver data of a use.
Source§

fn priv_global_use_semantic_data( &'db self, global_use_id: GlobalUseId<'db>, ) -> Result<UseGlobalData<'db>, DiagnosticAdded>

Private query to compute data about a global use.
Source§

fn priv_global_use_imported_module( &'db self, global_use_id: GlobalUseId<'db>, ) -> Result<ModuleId<'db>, DiagnosticAdded>

Private query to compute the imported module, given a global use.
Source§

fn global_use_semantic_diagnostics( &'db self, global_use_id: GlobalUseId<'db>, ) -> Diagnostics<'db, SemanticDiagnostic<'db>>

Returns the semantic diagnostics of a global use.
Source§

fn module_imported_modules( &'db self, _tracked: (), module_id: ModuleId<'db>, ) -> &'db OrderedHashMap<ModuleId<'db>, ImportInfo<'db>>

Computes the imported modules of a module, using global uses and macro calls.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more