Struct rustc_metadata::cstore::CrateMetadata [−][src]
pub struct CrateMetadata { pub name: Symbol, pub extern_crate: Lock<Option<ExternCrate>>, pub blob: MetadataBlob, pub cnum_map: CrateNumMap, pub cnum: CrateNum, pub dependencies: Lock<Vec<CrateNum>>, pub codemap_import_info: RwLock<Vec<ImportedFileMap>>, pub alloc_decoding_state: AllocDecodingState, pub root: CrateRoot, pub def_path_table: Lrc<DefPathTable>, pub trait_impls: FxHashMap<(u32, DefIndex), LazySeq<DefIndex>>, pub dep_kind: Lock<DepKind>, pub source: CrateSource, pub proc_macros: Option<Vec<(Name, Lrc<SyntaxExtension>)>>, }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Fields
name: Symbol
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
extern_crate: Lock<Option<ExternCrate>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Information about the extern crate that caused this crate to
be loaded. If this is None
, then the crate was injected
(e.g., by the allocator)
blob: MetadataBlob
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
cnum_map: CrateNumMap
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
cnum: CrateNum
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
dependencies: Lock<Vec<CrateNum>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
codemap_import_info: RwLock<Vec<ImportedFileMap>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
alloc_decoding_state: AllocDecodingState
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Used for decoding interpret::AllocIds in a cached & thread-safe manner.
root: CrateRoot
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
def_path_table: Lrc<DefPathTable>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
For each public item in this crate, we encode a key. When the
crate is loaded, we read all the keys and put them in this
hashmap, which gives the reverse mapping. This allows us to
quickly retrace a DefPath
, which is needed for incremental
compilation support.
trait_impls: FxHashMap<(u32, DefIndex), LazySeq<DefIndex>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
dep_kind: Lock<DepKind>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
source: CrateSource
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
proc_macros: Option<Vec<(Name, Lrc<SyntaxExtension>)>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Methods
impl<'a, 'tcx> CrateMetadata
[src]
impl<'a, 'tcx> CrateMetadata
fn is_proc_macro(&self, id: DefIndex) -> bool
[src]
fn is_proc_macro(&self, id: DefIndex) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn maybe_entry(&self, item_id: DefIndex) -> Option<Lazy<Entry<'tcx>>>
[src]
fn maybe_entry(&self, item_id: DefIndex) -> Option<Lazy<Entry<'tcx>>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn entry(&self, item_id: DefIndex) -> Entry<'tcx>
[src]
fn entry(&self, item_id: DefIndex) -> Entry<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn local_def_id(&self, index: DefIndex) -> DefId
[src]
fn local_def_id(&self, index: DefIndex) -> DefId
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn item_name(&self, item_index: DefIndex) -> InternedString
[src]
pub fn item_name(&self, item_index: DefIndex) -> InternedString
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_def(&self, index: DefIndex) -> Option<Def>
[src]
pub fn get_def(&self, index: DefIndex) -> Option<Def>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_span(&self, index: DefIndex, sess: &Session) -> Span
[src]
pub fn get_span(&self, index: DefIndex, sess: &Session) -> Span
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_trait_def(&self, item_id: DefIndex, sess: &Session) -> TraitDef
[src]
pub fn get_trait_def(&self, item_id: DefIndex, sess: &Session) -> TraitDef
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn get_variant(&self, item: &Entry, index: DefIndex) -> VariantDef
[src]
fn get_variant(&self, item: &Entry, index: DefIndex) -> VariantDef
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_adt_def(
&self,
item_id: DefIndex,
tcx: TyCtxt<'a, 'tcx, 'tcx>
) -> &'tcx AdtDef
[src]
pub fn get_adt_def(
&self,
item_id: DefIndex,
tcx: TyCtxt<'a, 'tcx, 'tcx>
) -> &'tcx AdtDef
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_predicates(
&self,
item_id: DefIndex,
tcx: TyCtxt<'a, 'tcx, 'tcx>
) -> GenericPredicates<'tcx>
[src]
pub fn get_predicates(
&self,
item_id: DefIndex,
tcx: TyCtxt<'a, 'tcx, 'tcx>
) -> GenericPredicates<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_super_predicates(
&self,
item_id: DefIndex,
tcx: TyCtxt<'a, 'tcx, 'tcx>
) -> GenericPredicates<'tcx>
[src]
pub fn get_super_predicates(
&self,
item_id: DefIndex,
tcx: TyCtxt<'a, 'tcx, 'tcx>
) -> GenericPredicates<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_generics(&self, item_id: DefIndex, sess: &Session) -> Generics
[src]
pub fn get_generics(&self, item_id: DefIndex, sess: &Session) -> Generics
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_type(&self, id: DefIndex, tcx: TyCtxt<'a, 'tcx, 'tcx>) -> Ty<'tcx>
[src]
pub fn get_type(&self, id: DefIndex, tcx: TyCtxt<'a, 'tcx, 'tcx>) -> Ty<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_stability(&self, id: DefIndex) -> Option<Stability>
[src]
pub fn get_stability(&self, id: DefIndex) -> Option<Stability>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_deprecation(&self, id: DefIndex) -> Option<Deprecation>
[src]
pub fn get_deprecation(&self, id: DefIndex) -> Option<Deprecation>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_visibility(&self, id: DefIndex) -> Visibility
[src]
pub fn get_visibility(&self, id: DefIndex) -> Visibility
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn get_impl_data(&self, id: DefIndex) -> ImplData<'tcx>
[src]
fn get_impl_data(&self, id: DefIndex) -> ImplData<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_parent_impl(&self, id: DefIndex) -> Option<DefId>
[src]
pub fn get_parent_impl(&self, id: DefIndex) -> Option<DefId>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_impl_polarity(&self, id: DefIndex) -> ImplPolarity
[src]
pub fn get_impl_polarity(&self, id: DefIndex) -> ImplPolarity
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_impl_defaultness(&self, id: DefIndex) -> Defaultness
[src]
pub fn get_impl_defaultness(&self, id: DefIndex) -> Defaultness
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_coerce_unsized_info(&self, id: DefIndex) -> Option<CoerceUnsizedInfo>
[src]
pub fn get_coerce_unsized_info(&self, id: DefIndex) -> Option<CoerceUnsizedInfo>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_impl_trait(
&self,
id: DefIndex,
tcx: TyCtxt<'a, 'tcx, 'tcx>
) -> Option<TraitRef<'tcx>>
[src]
pub fn get_impl_trait(
&self,
id: DefIndex,
tcx: TyCtxt<'a, 'tcx, 'tcx>
) -> Option<TraitRef<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_lang_items(&self) -> Vec<(DefId, usize)>
[src]
pub fn get_lang_items(&self) -> Vec<(DefId, usize)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Iterates over the language items in the given crate.
pub fn each_child_of_item<F>(&self, id: DefIndex, callback: F, sess: &Session) where
F: FnMut(Export),
[src]
pub fn each_child_of_item<F>(&self, id: DefIndex, callback: F, sess: &Session) where
F: FnMut(Export),
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Iterates over each child of the given item.
pub fn const_is_rvalue_promotable_to_static(&self, id: DefIndex) -> bool
[src]
pub fn const_is_rvalue_promotable_to_static(&self, id: DefIndex) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn is_item_mir_available(&self, id: DefIndex) -> bool
[src]
pub fn is_item_mir_available(&self, id: DefIndex) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn maybe_get_optimized_mir(
&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>,
id: DefIndex
) -> Option<Mir<'tcx>>
[src]
pub fn maybe_get_optimized_mir(
&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>,
id: DefIndex
) -> Option<Mir<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn mir_const_qualif(&self, id: DefIndex) -> u8
[src]
pub fn mir_const_qualif(&self, id: DefIndex) -> u8
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_associated_item(&self, id: DefIndex) -> AssociatedItem
[src]
pub fn get_associated_item(&self, id: DefIndex) -> AssociatedItem
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_item_variances(&self, id: DefIndex) -> Vec<Variance>
[src]
pub fn get_item_variances(&self, id: DefIndex) -> Vec<Variance>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_ctor_kind(&self, node_id: DefIndex) -> CtorKind
[src]
pub fn get_ctor_kind(&self, node_id: DefIndex) -> CtorKind
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_struct_ctor_def_id(&self, node_id: DefIndex) -> Option<DefId>
[src]
pub fn get_struct_ctor_def_id(&self, node_id: DefIndex) -> Option<DefId>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_item_attrs(
&self,
node_id: DefIndex,
sess: &Session
) -> Lrc<[Attribute]>
[src]
pub fn get_item_attrs(
&self,
node_id: DefIndex,
sess: &Session
) -> Lrc<[Attribute]>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_struct_field_names(&self, id: DefIndex) -> Vec<Name>
[src]
pub fn get_struct_field_names(&self, id: DefIndex) -> Vec<Name>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn get_attributes(&self, item: &Entry<'tcx>, sess: &Session) -> Vec<Attribute>
[src]
fn get_attributes(&self, item: &Entry<'tcx>, sess: &Session) -> Vec<Attribute>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn reverse_translate_def_id(&self, did: DefId) -> Option<DefId>
[src]
fn reverse_translate_def_id(&self, did: DefId) -> Option<DefId>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_inherent_implementations_for_type(&self, id: DefIndex) -> Vec<DefId>
[src]
pub fn get_inherent_implementations_for_type(&self, id: DefIndex) -> Vec<DefId>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_implementations_for_trait(
&self,
filter: Option<DefId>,
result: &mut Vec<DefId>
)
[src]
pub fn get_implementations_for_trait(
&self,
filter: Option<DefId>,
result: &mut Vec<DefId>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_trait_of_item(&self, id: DefIndex) -> Option<DefId>
[src]
pub fn get_trait_of_item(&self, id: DefIndex) -> Option<DefId>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_native_libraries(&self, sess: &Session) -> Vec<NativeLibrary>
[src]
pub fn get_native_libraries(&self, sess: &Session) -> Vec<NativeLibrary>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_foreign_modules(&self, sess: &Session) -> Vec<ForeignModule>
[src]
pub fn get_foreign_modules(&self, sess: &Session) -> Vec<ForeignModule>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_dylib_dependency_formats(&self) -> Vec<(CrateNum, LinkagePreference)>
[src]
pub fn get_dylib_dependency_formats(&self) -> Vec<(CrateNum, LinkagePreference)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_missing_lang_items(&self) -> Vec<LangItem>
[src]
pub fn get_missing_lang_items(&self) -> Vec<LangItem>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_fn_arg_names(&self, id: DefIndex) -> Vec<Name>
[src]
pub fn get_fn_arg_names(&self, id: DefIndex) -> Vec<Name>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn exported_symbols(
&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>
) -> Vec<(ExportedSymbol<'tcx>, SymbolExportLevel)>
[src]
pub fn exported_symbols(
&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>
) -> Vec<(ExportedSymbol<'tcx>, SymbolExportLevel)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_rendered_const(&self, id: DefIndex) -> String
[src]
pub fn get_rendered_const(&self, id: DefIndex) -> String
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn wasm_custom_sections(&self) -> Vec<DefId>
[src]
pub fn wasm_custom_sections(&self) -> Vec<DefId>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_macro(&self, id: DefIndex) -> (InternedString, MacroDef)
[src]
pub fn get_macro(&self, id: DefIndex) -> (InternedString, MacroDef)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn is_const_fn(&self, id: DefIndex) -> bool
[src]
pub fn is_const_fn(&self, id: DefIndex) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn is_foreign_item(&self, id: DefIndex) -> bool
[src]
pub fn is_foreign_item(&self, id: DefIndex) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn fn_sig(
&self,
id: DefIndex,
tcx: TyCtxt<'a, 'tcx, 'tcx>
) -> PolyFnSig<'tcx>
[src]
pub fn fn_sig(
&self,
id: DefIndex,
tcx: TyCtxt<'a, 'tcx, 'tcx>
) -> PolyFnSig<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn def_key(&self, index: DefIndex) -> DefKey
[src]
pub fn def_key(&self, index: DefIndex) -> DefKey
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn def_path(&self, id: DefIndex) -> DefPath
[src]
pub fn def_path(&self, id: DefIndex) -> DefPath
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn def_path_hash(&self, index: DefIndex) -> DefPathHash
[src]
pub fn def_path_hash(&self, index: DefIndex) -> DefPathHash
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn imported_filemaps(
&'a self,
local_codemap: &CodeMap
) -> ReadGuard<'a, Vec<ImportedFileMap>>
[src]
pub fn imported_filemaps(
&'a self,
local_codemap: &CodeMap
) -> ReadGuard<'a, Vec<ImportedFileMap>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Imports the codemap from an external crate into the codemap of the crate currently being compiled (the "local crate").
The import algorithm works analogous to how AST items are inlined from an
external crate's metadata:
For every FileMap in the external codemap an 'inline' copy is created in the
local codemap. The correspondence relation between external and local
FileMaps is recorded in the ImportedFileMap
objects returned from this
function. When an item from an external crate is later inlined into this
crate, this correspondence information is used to translate the span
information of the inlined item so that it refers the correct positions in
the local codemap (see <decoder::DecodeContext as SpecializedDecoder<Span>>
).
The import algorithm in the function below will reuse FileMaps already existing in the local codemap. For example, even if the FileMap of some source file of libstd gets imported many times, there will only ever be one FileMap object for the corresponding file in the local codemap.
Note that imported FileMaps do not actually contain the source code of the file they represent, just information about length, line breaks, and multibyte characters. This information is enough to generate valid debuginfo for items inlined from other crates.
Trait Implementations
impl<'a, 'tcx> Metadata<'a, 'tcx> for &'a CrateMetadata
[src]
impl<'a, 'tcx> Metadata<'a, 'tcx> for &'a CrateMetadata
fn raw_bytes(self) -> &'a [u8]
[src]
fn raw_bytes(self) -> &'a [u8]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn cdata(self) -> Option<&'a CrateMetadata>
[src]
fn cdata(self) -> Option<&'a CrateMetadata>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn sess(self) -> Option<&'a Session>
[src]
fn sess(self) -> Option<&'a Session>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn tcx(self) -> Option<TyCtxt<'a, 'tcx, 'tcx>>
[src]
fn tcx(self) -> Option<TyCtxt<'a, 'tcx, 'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn decoder(self, pos: usize) -> DecodeContext<'a, 'tcx>
[src]
fn decoder(self, pos: usize) -> DecodeContext<'a, 'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Auto Trait Implementations
impl !Send for CrateMetadata
impl !Send for CrateMetadata
impl !Sync for CrateMetadata
impl !Sync for CrateMetadata