ide

Struct RootDatabase

source
pub struct RootDatabase { /* private fields */ }

Implementations§

source§

impl RootDatabase

source

pub fn request_cancellation(&mut self)

source

pub fn apply_change(&mut self, change: ChangeWithProcMacros)

source

pub fn per_query_memory_usage(&mut self) -> Vec<(String, Bytes, usize)>

source§

impl RootDatabase

source

pub fn new(lru_capacity: Option<u16>) -> RootDatabase

source

pub fn enable_proc_attr_macros(&mut self)

source

pub fn update_base_query_lru_capacities(&mut self, lru_capacity: Option<u16>)

source

pub fn update_lru_capacities( &mut self, lru_capacities: &HashMap<Box<str>, u16, FxBuildHasher>, )

Trait Implementations§

source§

impl Database for RootDatabase

§

fn salsa_event(&self, event_fn: Event)

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

fn unwind_if_cancelled(&self)

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

fn salsa_runtime(&self) -> &Runtime

Gives access to the underlying salsa runtime. Read more
§

fn synthetic_write(&mut self, durability: Durability)

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

impl Debug for RootDatabase

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for RootDatabase

source§

fn default() -> RootDatabase

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

impl Drop for RootDatabase

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl FileLoader for RootDatabase

source§

fn resolve_path(&self, path: AnchoredPath<'_>) -> Option<FileId>

source§

fn relevant_crates(&self, file_id: FileId) -> Arc<[Idx<CrateData>]>

Crates whose root’s source root is the same as the source root of file_id
source§

impl ParallelDatabase for RootDatabase

source§

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

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

impl Upcast<dyn DefDatabase> for RootDatabase

source§

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

source§

impl Upcast<dyn ExpandDatabase> for RootDatabase

source§

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

source§

impl Upcast<dyn HirDatabase> for RootDatabase

source§

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

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
§

impl<T> Cast for T

§

fn cast<U>(self, interner: <U as HasInterner>::Interner) -> U
where Self: CastTo<U>, U: HasInterner,

Cast a value to type U using CastTo.
source§

impl<DB> DefDatabase for DB
where DB: InternDatabase + ExpandDatabase + Upcast<dyn ExpandDatabase> + Database + HasQueryGroup<DefDatabaseStorage>,

source§

fn expand_proc_attr_macros(&self) -> bool

Whether to expand procedural macros during name resolution.
source§

fn set_expand_proc_attr_macros(&mut self, value__: bool)

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

fn set_expand_proc_attr_macros_with_durability( &mut self, value__: bool, durability__: Durability, )

Set the value of the expand_proc_attr_macros input with a specific durability instead of the default of Durability::LOW. You can use Durability::MAX to promise that its value will never change again. Read more
source§

fn file_item_tree(&self, file_id: HirFileId) -> Arc<ItemTree>

Computes an ItemTree for the given file or macro expansion.
source§

fn block_item_tree(&self, block_id: BlockId) -> Arc<ItemTree>

source§

fn file_item_tree_with_source_map( &self, file_id: HirFileId, ) -> (Arc<ItemTree>, Arc<ItemTreeSourceMaps>)

source§

fn block_item_tree_with_source_map( &self, block_id: BlockId, ) -> (Arc<ItemTree>, Arc<ItemTreeSourceMaps>)

source§

fn crate_def_map(&self, krate: Idx<CrateData>) -> Arc<DefMap>

source§

fn block_def_map(&self, block: BlockId) -> Arc<DefMap>

Computes the block-level DefMap.
source§

fn macro_def(&self, m: MacroId) -> MacroDefId

Turns a MacroId into a MacroDefId, describing the macro’s definition post name resolution.
source§

fn struct_data(&self, id: StructId) -> Arc<StructData>

source§

fn struct_data_with_diagnostics( &self, id: StructId, ) -> (Arc<StructData>, DefDiagnostics)

source§

fn union_data(&self, id: UnionId) -> Arc<StructData>

source§

fn union_data_with_diagnostics( &self, id: UnionId, ) -> (Arc<StructData>, DefDiagnostics)

source§

fn enum_data(&self, e: EnumId) -> Arc<EnumData>

source§

fn enum_variant_data(&self, id: EnumVariantId) -> Arc<EnumVariantData>

source§

fn enum_variant_data_with_diagnostics( &self, id: EnumVariantId, ) -> (Arc<EnumVariantData>, DefDiagnostics)

source§

fn variant_data(&self, id: VariantId) -> Arc<VariantData>

source§

fn impl_data(&self, e: ImplId) -> Arc<ImplData>

source§

fn impl_data_with_diagnostics( &self, e: ImplId, ) -> (Arc<ImplData>, DefDiagnostics)

source§

fn trait_data(&self, e: TraitId) -> Arc<TraitData>

source§

fn trait_data_with_diagnostics( &self, tr: TraitId, ) -> (Arc<TraitData>, DefDiagnostics)

source§

fn trait_alias_data(&self, e: TraitAliasId) -> Arc<TraitAliasData>

source§

fn type_alias_data(&self, e: TypeAliasId) -> Arc<TypeAliasData>

source§

fn function_data(&self, func: FunctionId) -> Arc<FunctionData>

source§

fn const_data(&self, konst: ConstId) -> Arc<ConstData>

source§

fn static_data(&self, statik: StaticId) -> Arc<StaticData>

source§

fn macro2_data(&self, makro: Macro2Id) -> Arc<Macro2Data>

source§

fn macro_rules_data(&self, makro: MacroRulesId) -> Arc<MacroRulesData>

source§

fn proc_macro_data(&self, makro: ProcMacroId) -> Arc<ProcMacroData>

source§

fn extern_crate_decl_data( &self, extern_crate: ExternCrateId, ) -> Arc<ExternCrateDeclData>

source§

fn body_with_source_map( &self, def: DefWithBodyId, ) -> (Arc<Body>, Arc<BodySourceMap>)

source§

fn body(&self, def: DefWithBodyId) -> Arc<Body>

source§

fn expr_scopes(&self, def: DefWithBodyId) -> Arc<ExprScopes>

source§

fn generic_params(&self, def: GenericDefId) -> Arc<GenericParams>

source§

fn generic_params_with_source_map( &self, def: GenericDefId, ) -> (Arc<GenericParams>, Option<Arc<TypesSourceMap>>)

If this returns None for the source map, that means it is the same as with the item tree.
source§

fn fields_attrs(&self, def: VariantId) -> Arc<ArenaMap<Idx<FieldData>, Attrs>>

source§

fn fields_attrs_source_map( &self, def: VariantId, ) -> Arc<ArenaMap<Idx<FieldData>, AstPtr<Either<TupleField, RecordField>>>>

source§

fn attrs(&self, def: AttrDefId) -> Attrs

source§

fn lang_attr(&self, def: AttrDefId) -> Option<LangItem>

source§

fn lang_item( &self, start_crate: Idx<CrateData>, item: LangItem, ) -> Option<LangItemTarget>

source§

fn import_map(&self, krate: Idx<CrateData>) -> Arc<ImportMap>

source§

fn field_visibilities( &self, var: VariantId, ) -> Arc<ArenaMap<Idx<FieldData>, Visibility>>

source§

fn function_visibility(&self, def: FunctionId) -> Visibility

source§

fn const_visibility(&self, def: ConstId) -> Visibility

source§

fn crate_lang_items(&self, krate: Idx<CrateData>) -> Option<Arc<LangItems>>

source§

fn notable_traits_in_deps(&self, krate: Idx<CrateData>) -> Arc<[Arc<[TraitId]>]>

source§

fn crate_notable_traits(&self, krate: Idx<CrateData>) -> Option<Arc<[TraitId]>>

source§

fn crate_supports_no_std(&self, crate_id: Idx<CrateData>) -> bool

source§

fn include_macro_invoc( &self, crate_id: Idx<CrateData>, ) -> Arc<[(MacroCallId, EditionedFileId)]>

source§

impl<DB> ExpandDatabase for DB
where DB: SourceDatabase + Database + HasQueryGroup<ExpandDatabaseStorage>,

source§

fn proc_macros(&self) -> Arc<ProcMacros>

The proc macros.
source§

fn set_proc_macros(&mut self, value__: Arc<ProcMacros>)

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

fn set_proc_macros_with_durability( &mut self, value__: Arc<ProcMacros>, durability__: Durability, )

Set the value of the proc_macros input with a specific durability instead of the default of Durability::LOW. You can use Durability::MAX to promise that its value will never change again. Read more
source§

fn ast_id_map(&self, file_id: HirFileId) -> Arc<AstIdMap>

source§

fn parse_or_expand(&self, file_id: HirFileId) -> SyntaxNode<RustLanguage>

Main public API – parses a hir file, not caring whether it’s a real file or a macro expansion.
source§

fn parse_macro_expansion( &self, macro_file: MacroFileId, ) -> ValueResult<(Parse<SyntaxNode<RustLanguage>>, Arc<SpanMap<SyntaxContextId>>), ExpandError>

Implementation for the macro case.
source§

fn span_map(&self, file_id: HirFileId) -> SpanMap

source§

fn expansion_span_map( &self, file_id: MacroFileId, ) -> Arc<SpanMap<SyntaxContextId>>

source§

fn real_span_map(&self, file_id: EditionedFileId) -> Arc<RealSpanMap>

source§

fn intern_macro_call(&self, macro_call: MacroCallLoc) -> MacroCallId

Macro ids. That’s probably the tricksiest bit in rust-analyzer, and the reason why we use salsa at all. Read more
source§

fn lookup_intern_macro_call(&self, key: MacroCallId) -> MacroCallLoc

source§

fn intern_syntax_context(&self, ctx: SyntaxContextData) -> SyntaxContextId

source§

fn lookup_intern_syntax_context( &self, key: SyntaxContextId, ) -> SyntaxContextData

source§

fn setup_syntax_context_root(&self)

source§

fn dump_syntax_contexts(&self) -> String

source§

fn macro_arg( &self, id: MacroCallId, ) -> (Arc<Subtree<SpanData<SyntaxContextId>>>, SyntaxFixupUndoInfo, SpanData<SyntaxContextId>)

👎Deprecated: calling this is incorrect, call macro_arg_considering_derives instead
Lowers syntactic macro call to a token tree representation. That’s a firewall query, only typing in the macro call itself changes the returned subtree.
source§

fn macro_arg_considering_derives( &self, id: MacroCallId, kind: &MacroCallKind, ) -> (Arc<Subtree<SpanData<SyntaxContextId>>>, SyntaxFixupUndoInfo, SpanData<SyntaxContextId>)

source§

fn macro_expander(&self, id: MacroDefId) -> TokenExpander

Fetches the expander for this macro.
source§

fn decl_macro_expander( &self, def_crate: Idx<CrateData>, id: InFileWrapper<HirFileId, FileAstId<Macro>>, ) -> Arc<DeclarativeMacroExpander>

Fetches (and compiles) the expander of this decl macro.
source§

fn expand_proc_macro( &self, call: MacroCallId, ) -> ValueResult<Arc<Subtree<SpanData<SyntaxContextId>>>, ExpandError>

Special case of the previous query for procedural macros. We can’t LRU proc macros, since they are not deterministic in general, and non-determinism breaks salsa in a very, very, very bad way. @edwin0cheng heroically debugged this once! See #4315 for details
source§

fn proc_macro_span( &self, fun: InFileWrapper<HirFileId, FileAstId<Fn>>, ) -> SpanData<SyntaxContextId>

Retrieves the span to be used for a proc-macro expansions spans. This is a firewall query as it requires parsing the file, which we don’t want proc-macros to directly depend on as that would cause to frequent invalidations, mainly because of the parse queries being LRU cached. If they weren’t the invalidations would only happen if the user wrote in the file that defines the proc-macro.
source§

fn parse_macro_expansion_error( &self, macro_call: MacroCallId, ) -> Option<Arc<ValueResult<Arc<[SyntaxError]>, ExpandError>>>

Firewall query that returns the errors from the parse_macro_expansion query.
source§

fn syntax_context(&self, file: HirFileId) -> SyntaxContextId

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<DB> HirDatabase for DB
where DB: DefDatabase + Upcast<dyn DefDatabase> + Database + HasQueryGroup<HirDatabaseStorage>,

source§

fn infer(&self, def: DefWithBodyId) -> Arc<InferenceResult>

source§

fn mir_body(&self, def: DefWithBodyId) -> Result<Arc<MirBody>, MirLowerError>

source§

fn mir_body_for_closure( &self, def: ClosureId<Interner>, ) -> Result<Arc<MirBody>, MirLowerError>

source§

fn monomorphized_mir_body( &self, def: DefWithBodyId, subst: Substitution<Interner>, env: Arc<TraitEnvironment>, ) -> Result<Arc<MirBody>, MirLowerError>

source§

fn monomorphized_mir_body_for_closure( &self, def: ClosureId<Interner>, subst: Substitution<Interner>, env: Arc<TraitEnvironment>, ) -> Result<Arc<MirBody>, MirLowerError>

source§

fn borrowck( &self, def: DefWithBodyId, ) -> Result<Arc<[BorrowckResult]>, MirLowerError>

source§

fn const_eval( &self, def: GeneralConstId, subst: Substitution<Interner>, trait_env: Option<Arc<TraitEnvironment>>, ) -> Result<Const<Interner>, ConstEvalError>

source§

fn const_eval_static( &self, def: StaticId, ) -> Result<Const<Interner>, ConstEvalError>

source§

fn const_eval_discriminant( &self, def: EnumVariantId, ) -> Result<i128, ConstEvalError>

source§

fn lookup_impl_method( &self, env: Arc<TraitEnvironment>, func: FunctionId, fn_subst: Substitution<Interner>, ) -> (FunctionId, Substitution<Interner>)

source§

fn layout_of_adt( &self, def: AdtId, subst: Substitution<Interner>, env: Arc<TraitEnvironment>, ) -> Result<Arc<LayoutData<RustcFieldIdx, RustcEnumVariantIdx>>, LayoutError>

source§

fn layout_of_ty( &self, ty: Ty<Interner>, env: Arc<TraitEnvironment>, ) -> Result<Arc<LayoutData<RustcFieldIdx, RustcEnumVariantIdx>>, LayoutError>

source§

fn target_data_layout( &self, krate: Idx<CrateData>, ) -> Result<Arc<TargetDataLayout>, Arc<str>>

source§

fn dyn_compatibility_of_trait( &self, trait_: TraitId, ) -> Option<DynCompatibilityViolation>

source§

fn ty(&self, def: TyDefId) -> Binders<Ty<Interner>>

source§

fn type_for_type_alias_with_diagnostics( &self, def: TypeAliasId, ) -> (Binders<Ty<Interner>>, Option<ThinArc<(), TyLoweringDiagnostic>>)

source§

fn value_ty(&self, def: ValueTyDefId) -> Option<Binders<Ty<Interner>>>

Returns the type of the value of the given constant, or None if the ValueTyDefId is a StructId or EnumVariantId with a record constructor.
source§

fn impl_self_ty_with_diagnostics( &self, def: ImplId, ) -> (Binders<Ty<Interner>>, Option<ThinArc<(), TyLoweringDiagnostic>>)

source§

fn impl_self_ty(&self, def: ImplId) -> Binders<Ty<Interner>>

source§

fn const_param_ty_with_diagnostics( &self, def: ConstParamId, ) -> (Ty<Interner>, Option<ThinArc<(), TyLoweringDiagnostic>>)

source§

fn const_param_ty(&self, def: ConstParamId) -> Ty<Interner>

source§

fn impl_trait_with_diagnostics( &self, def: ImplId, ) -> Option<(Binders<TraitRef<Interner>>, Option<ThinArc<(), TyLoweringDiagnostic>>)>

source§

fn impl_trait(&self, def: ImplId) -> Option<Binders<TraitRef<Interner>>>

source§

fn field_types_with_diagnostics( &self, var: VariantId, ) -> (Arc<ArenaMap<Idx<FieldData>, Binders<Ty<Interner>>>>, Option<ThinArc<(), TyLoweringDiagnostic>>)

source§

fn field_types( &self, var: VariantId, ) -> Arc<ArenaMap<Idx<FieldData>, Binders<Ty<Interner>>>>

source§

fn callable_item_signature(&self, def: CallableDefId) -> Binders<CallableSig>

source§

fn return_type_impl_traits( &self, def: FunctionId, ) -> Option<Arc<Binders<ImplTraits>>>

source§

fn type_alias_impl_traits( &self, def: TypeAliasId, ) -> Option<Arc<Binders<ImplTraits>>>

source§

fn generic_predicates_for_param( &self, def: GenericDefId, param_id: TypeOrConstParamId, assoc_name: Option<Name>, ) -> GenericPredicates

source§

fn generic_predicates(&self, def: GenericDefId) -> GenericPredicates

source§

fn generic_predicates_without_parent_with_diagnostics( &self, def: GenericDefId, ) -> (GenericPredicates, Option<ThinArc<(), TyLoweringDiagnostic>>)

source§

fn generic_predicates_without_parent( &self, def: GenericDefId, ) -> GenericPredicates

source§

fn trait_environment_for_body( &self, def: DefWithBodyId, ) -> Arc<TraitEnvironment>

source§

fn trait_environment(&self, def: GenericDefId) -> Arc<TraitEnvironment>

source§

fn generic_defaults_with_diagnostics( &self, def: GenericDefId, ) -> (GenericDefaults, Option<ThinArc<(), TyLoweringDiagnostic>>)

source§

fn generic_defaults(&self, def: GenericDefId) -> GenericDefaults

source§

fn inherent_impls_in_crate(&self, krate: Idx<CrateData>) -> Arc<InherentImpls>

source§

fn inherent_impls_in_block(&self, block: BlockId) -> Option<Arc<InherentImpls>>

source§

fn incoherent_inherent_impl_crates( &self, krate: Idx<CrateData>, fp: TyFingerprint, ) -> SmallVec<[Idx<CrateData>; 2]>

Collects all crates in the dependency graph that have impls for the given fingerprint. This is only used for primitive types and types annotated with rustc_has_incoherent_inherent_impls; for other types we just look at the crate where the type is defined.
source§

fn trait_impls_in_crate(&self, krate: Idx<CrateData>) -> Arc<TraitImpls>

source§

fn trait_impls_in_block(&self, block: BlockId) -> Option<Arc<TraitImpls>>

source§

fn trait_impls_in_deps(&self, krate: Idx<CrateData>) -> Arc<[Arc<TraitImpls>]>

source§

fn intern_callable_def( &self, callable_def: CallableDefId, ) -> InternedCallableDefId

source§

fn lookup_intern_callable_def( &self, key: InternedCallableDefId, ) -> CallableDefId

source§

fn intern_type_or_const_param_id( &self, param_id: TypeOrConstParamId, ) -> InternedTypeOrConstParamId

source§

fn lookup_intern_type_or_const_param_id( &self, key: InternedTypeOrConstParamId, ) -> TypeOrConstParamId

source§

fn intern_lifetime_param_id( &self, param_id: LifetimeParamId, ) -> InternedLifetimeParamId

source§

fn lookup_intern_lifetime_param_id( &self, key: InternedLifetimeParamId, ) -> LifetimeParamId

source§

fn intern_impl_trait_id(&self, id: ImplTraitId) -> InternedOpaqueTyId

source§

fn lookup_intern_impl_trait_id(&self, key: InternedOpaqueTyId) -> ImplTraitId

source§

fn intern_closure(&self, id: InternedClosure) -> InternedClosureId

source§

fn lookup_intern_closure(&self, key: InternedClosureId) -> InternedClosure

source§

fn intern_coroutine(&self, id: InternedCoroutine) -> InternedCoroutineId

source§

fn lookup_intern_coroutine(&self, key: InternedCoroutineId) -> InternedCoroutine

source§

fn associated_ty_data( &self, id: AssocTypeId<Interner>, ) -> Arc<AssociatedTyDatum<Interner>>

source§

fn trait_datum( &self, krate: Idx<CrateData>, trait_id: TraitId<Interner>, ) -> Arc<TraitDatum<Interner>>

source§

fn adt_datum( &self, krate: Idx<CrateData>, struct_id: AdtId<Interner>, ) -> Arc<AdtDatum<Interner>>

source§

fn impl_datum( &self, krate: Idx<CrateData>, impl_id: ImplId<Interner>, ) -> Arc<ImplDatum<Interner>>

source§

fn fn_def_datum( &self, fn_def_id: FnDefId<Interner>, ) -> Arc<FnDefDatum<Interner>>

source§

fn fn_def_variance(&self, fn_def_id: FnDefId<Interner>) -> Variances<Interner>

source§

fn adt_variance(&self, adt_id: AdtId<Interner>) -> Variances<Interner>

source§

fn associated_ty_value( &self, krate: Idx<CrateData>, id: AssociatedTyValueId<Interner>, ) -> Arc<AssociatedTyValue<Interner>>

source§

fn normalize_projection( &self, projection: ProjectionTy<Interner>, env: Arc<TraitEnvironment>, ) -> Ty<Interner>

source§

fn trait_solve( &self, krate: Idx<CrateData>, block: Option<BlockId>, goal: Canonical<InEnvironment<Goal<Interner>>>, ) -> Option<Solution<Interner>>

source§

fn program_clauses_for_chalk_env( &self, krate: Idx<CrateData>, block: Option<BlockId>, env: Environment<Interner>, ) -> ProgramClauses<Interner>

§

impl<T> Instrument for T

§

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

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<DB> InternDatabase for DB
where DB: SourceDatabase + Database + HasQueryGroup<InternDatabaseStorage>,

source§

fn intern_use(&self, loc: ItemLoc<Use>) -> UseId

source§

fn lookup_intern_use(&self, key: UseId) -> ItemLoc<Use>

source§

fn intern_extern_crate(&self, loc: ItemLoc<ExternCrate>) -> ExternCrateId

source§

fn lookup_intern_extern_crate(&self, key: ExternCrateId) -> ItemLoc<ExternCrate>

source§

fn intern_function(&self, loc: AssocItemLoc<Function>) -> FunctionId

source§

fn lookup_intern_function(&self, key: FunctionId) -> AssocItemLoc<Function>

source§

fn intern_struct(&self, loc: ItemLoc<Struct>) -> StructId

source§

fn lookup_intern_struct(&self, key: StructId) -> ItemLoc<Struct>

source§

fn intern_union(&self, loc: ItemLoc<Union>) -> UnionId

source§

fn lookup_intern_union(&self, key: UnionId) -> ItemLoc<Union>

source§

fn intern_enum(&self, loc: ItemLoc<Enum>) -> EnumId

source§

fn lookup_intern_enum(&self, key: EnumId) -> ItemLoc<Enum>

source§

fn intern_enum_variant(&self, loc: EnumVariantLoc) -> EnumVariantId

source§

fn lookup_intern_enum_variant(&self, key: EnumVariantId) -> EnumVariantLoc

source§

fn intern_const(&self, loc: AssocItemLoc<Const>) -> ConstId

source§

fn lookup_intern_const(&self, key: ConstId) -> AssocItemLoc<Const>

source§

fn intern_static(&self, loc: AssocItemLoc<Static>) -> StaticId

source§

fn lookup_intern_static(&self, key: StaticId) -> AssocItemLoc<Static>

source§

fn intern_trait(&self, loc: ItemLoc<Trait>) -> TraitId

source§

fn lookup_intern_trait(&self, key: TraitId) -> ItemLoc<Trait>

source§

fn intern_trait_alias(&self, loc: ItemLoc<TraitAlias>) -> TraitAliasId

source§

fn lookup_intern_trait_alias(&self, key: TraitAliasId) -> ItemLoc<TraitAlias>

source§

fn intern_type_alias(&self, loc: AssocItemLoc<TypeAlias>) -> TypeAliasId

source§

fn lookup_intern_type_alias(&self, key: TypeAliasId) -> AssocItemLoc<TypeAlias>

source§

fn intern_impl(&self, loc: ItemLoc<Impl>) -> ImplId

source§

fn lookup_intern_impl(&self, key: ImplId) -> ItemLoc<Impl>

source§

fn intern_extern_block(&self, loc: ItemLoc<ExternBlock>) -> ExternBlockId

source§

fn lookup_intern_extern_block(&self, key: ExternBlockId) -> ItemLoc<ExternBlock>

source§

fn intern_macro2(&self, loc: Macro2Loc) -> Macro2Id

source§

fn lookup_intern_macro2(&self, key: Macro2Id) -> Macro2Loc

source§

fn intern_proc_macro(&self, loc: ProcMacroLoc) -> ProcMacroId

source§

fn lookup_intern_proc_macro(&self, key: ProcMacroId) -> ProcMacroLoc

source§

fn intern_macro_rules(&self, loc: MacroRulesLoc) -> MacroRulesId

source§

fn lookup_intern_macro_rules(&self, key: MacroRulesId) -> MacroRulesLoc

source§

fn intern_block(&self, loc: BlockLoc) -> BlockId

source§

fn lookup_intern_block(&self, key: BlockId) -> BlockLoc

source§

fn intern_anonymous_const(&self, id: ConstBlockLoc) -> ConstBlockId

source§

fn lookup_intern_anonymous_const(&self, key: ConstBlockId) -> ConstBlockLoc

source§

fn intern_in_type_const(&self, id: InTypeConstLoc) -> InTypeConstId

source§

fn lookup_intern_in_type_const(&self, key: InTypeConstId) -> InTypeConstLoc

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.

§

impl<T> IntoBox<dyn Any> for T
where T: Any,

§

fn into_box(self) -> Box<dyn Any>

Convert self into the appropriate boxed form.
§

impl<T> IntoBox<dyn Any + Send> for T
where T: Any + Send,

§

fn into_box(self) -> Box<dyn Any + Send>

Convert self into the appropriate boxed form.
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<DB> LineIndexDatabase for DB
where DB: SourceDatabase + Database + HasQueryGroup<LineIndexDatabaseStorage>,

source§

fn line_index(&self, file_id: FileId) -> Arc<LineIndex>

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<DB> SourceDatabase for DB
where DB: FileLoader + Debug + Database + HasQueryGroup<SourceDatabaseStorage>,

source§

fn compressed_file_text(&self, file_id: FileId) -> Arc<[u8]>

source§

fn set_compressed_file_text(&mut self, file_id: FileId, value__: Arc<[u8]>)

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

fn set_compressed_file_text_with_durability( &mut self, file_id: FileId, value__: Arc<[u8]>, durability__: Durability, )

Set the value of the compressed_file_text input with a specific durability instead of the default of Durability::LOW. You can use Durability::MAX to promise that its value will never change again. Read more
source§

fn file_text(&self, file_id: FileId) -> Arc<str>

Text of the file.
source§

fn parse(&self, file_id: EditionedFileId) -> Parse<SourceFile>

Parses the file into the syntax tree.
source§

fn parse_errors(&self, file_id: EditionedFileId) -> Option<Arc<[SyntaxError]>>

Returns the set of errors obtained from parsing the file including validation errors.
source§

fn crate_graph(&self) -> Arc<CrateGraph>

The crate graph.
source§

fn set_crate_graph(&mut self, value__: Arc<CrateGraph>)

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

fn set_crate_graph_with_durability( &mut self, value__: Arc<CrateGraph>, durability__: Durability, )

Set the value of the crate_graph input with a specific durability instead of the default of Durability::LOW. You can use Durability::MAX to promise that its value will never change again. Read more
source§

fn crate_workspace_data( &self, ) -> Arc<HashMap<Idx<CrateData>, Arc<CrateWorkspaceData>, FxBuildHasher>>

source§

fn set_crate_workspace_data( &mut self, value__: Arc<HashMap<Idx<CrateData>, Arc<CrateWorkspaceData>, FxBuildHasher>>, )

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

fn set_crate_workspace_data_with_durability( &mut self, value__: Arc<HashMap<Idx<CrateData>, Arc<CrateWorkspaceData>, FxBuildHasher>>, durability__: Durability, )

Set the value of the crate_workspace_data input with a specific durability instead of the default of Durability::LOW. You can use Durability::MAX to promise that its value will never change again. Read more
source§

fn toolchain_channel(&self, krate: Idx<CrateData>) -> Option<ReleaseChannel>

source§

impl<Db> SourceDatabaseFileInputExt for Db

source§

fn set_file_text_with_durability( &mut self, file_id: FileId, text: &str, durability: Durability, )

source§

fn set_file_text(&mut self, file_id: FileId, text: &str)

source§

impl<DB> SourceRootDatabase for DB
where DB: SourceDatabase + Database + HasQueryGroup<SourceRootDatabaseStorage>,

source§

fn file_source_root(&self, file_id: FileId) -> SourceRootId

Path to a file, relative to the root of its source root. Source root of the file.
source§

fn set_file_source_root(&mut self, file_id: FileId, value__: SourceRootId)

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

fn set_file_source_root_with_durability( &mut self, file_id: FileId, value__: SourceRootId, durability__: Durability, )

Set the value of the file_source_root input with a specific durability instead of the default of Durability::LOW. You can use Durability::MAX to promise that its value will never change again. Read more
source§

fn source_root(&self, id: SourceRootId) -> Arc<SourceRoot>

Contents of the source root.
source§

fn set_source_root(&mut self, id: SourceRootId, value__: Arc<SourceRoot>)

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

fn set_source_root_with_durability( &mut self, id: SourceRootId, value__: Arc<SourceRoot>, durability__: Durability, )

Set the value of the source_root input with a specific durability instead of the default of Durability::LOW. You can use Durability::MAX to promise that its value will never change again. Read more
source§

fn source_root_crates(&self, id: SourceRootId) -> Arc<[Idx<CrateData>]>

Crates whose root fool is in id.
source§

impl<DB> SymbolsDatabase for DB
where DB: HirDatabase + SourceRootDatabase + Upcast<dyn HirDatabase> + Database + HasQueryGroup<SymbolsDatabaseStorage>,

source§

fn module_symbols(&self, module: Module) -> Arc<SymbolIndex>

The symbol index for a given module. These modules should only be in source roots that are inside local_roots.
source§

fn library_symbols(&self, source_root_id: SourceRootId) -> Arc<SymbolIndex>

The symbol index for a given source root within library_roots.
source§

fn crate_symbols(&self, krate: Crate) -> Box<[Arc<SymbolIndex>]>

The symbol indices of modules that make up a given crate.
source§

fn local_roots(&self) -> Arc<HashSet<SourceRootId, FxBuildHasher>>

The set of “local” (that is, from the current workspace) roots. Files in local roots are assumed to change frequently.
source§

fn set_local_roots( &mut self, value__: Arc<HashSet<SourceRootId, FxBuildHasher>>, )

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

fn set_local_roots_with_durability( &mut self, value__: Arc<HashSet<SourceRootId, FxBuildHasher>>, durability__: Durability, )

Set the value of the local_roots input with a specific durability instead of the default of Durability::LOW. You can use Durability::MAX to promise that its value will never change again. Read more
source§

fn library_roots(&self) -> Arc<HashSet<SourceRootId, FxBuildHasher>>

The set of roots for crates.io libraries. Files in libraries are assumed to never change.
source§

fn set_library_roots( &mut self, value__: Arc<HashSet<SourceRootId, FxBuildHasher>>, )

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

fn set_library_roots_with_durability( &mut self, value__: Arc<HashSet<SourceRootId, FxBuildHasher>>, durability__: Durability, )

Set the value of the library_roots input with a specific durability instead of the default of Durability::LOW. You can use Durability::MAX to promise that its value will never change again. 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<'a, T> Captures<'a> for T
where T: ?Sized,