[−][src]Struct rustc_save_analysis::SaveContext
Fields
tcx: TyCtxt<'tcx>maybe_typeck_results: Option<&'tcx TypeckResults<'tcx>>access_levels: &'tcx AccessLevelsspan_utils: SpanUtils<'tcx>config: Configimpl_counter: Cell<u32>Implementations
impl<'tcx> SaveContext<'tcx>[src]
pub(crate) fn typeck_results(&self) -> &'tcx TypeckResults<'tcx>[src]
Gets the type-checking results for the current body.
As this will ICE if called outside bodies, only call when working with
Expr or Pat nodes (they are guaranteed to be found only in bodies).
pub(crate) fn span_from_span(&self, span: Span) -> SpanData[src]
pub fn compilation_output(&self, crate_name: &str) -> PathBuf[src]
pub fn get_external_crates(&self) -> Vec<ExternalCrateData>[src]
pub fn get_extern_item_data(&self, item: &ForeignItem<'_>) -> Option<Data>[src]
pub fn get_item_data(&self, item: &Item<'_>) -> Option<Data>[src]
pub fn get_field_data(
&self,
field: &StructField<'_>,
scope: HirId
) -> Option<Def>[src]
&self,
field: &StructField<'_>,
scope: HirId
) -> Option<Def>
pub fn get_method_data(
&self,
hir_id: HirId,
ident: Ident,
span: Span
) -> Option<Def>[src]
&self,
hir_id: HirId,
ident: Ident,
span: Span
) -> Option<Def>
pub fn get_trait_ref_data(&self, trait_ref: &TraitRef<'_>) -> Option<Ref>[src]
pub fn get_expr_data(&self, expr: &Expr<'_>) -> Option<Data>[src]
pub fn get_path_res(&self, hir_id: HirId) -> Res[src]
pub fn get_path_data(&self, id: HirId, path: &QPath<'_>) -> Option<Ref>[src]
pub fn get_path_segment_data(&self, path_seg: &PathSegment<'_>) -> Option<Ref>[src]
pub fn get_path_segment_data_with_id(
&self,
path_seg: &PathSegment<'_>,
id: HirId
) -> Option<Ref>[src]
&self,
path_seg: &PathSegment<'_>,
id: HirId
) -> Option<Ref>
pub fn get_field_ref_data(
&self,
field_ref: &Field<'_>,
variant: &VariantDef
) -> Option<Ref>[src]
&self,
field_ref: &Field<'_>,
variant: &VariantDef
) -> Option<Ref>
pub fn get_macro_use_data(&self, span: Span) -> Option<MacroRef>[src]
Attempt to return MacroRef for any AST node.
For a given piece of AST defined by the supplied Span and NodeId,
returns None if the node is not macro-generated or the span is malformed,
else uses the expansion callsite and callee to return some MacroRef.
pub(crate) fn lookup_def_id(&self, ref_id: HirId) -> Option<DefId>[src]
pub(crate) fn docs_for_attrs(&self, attrs: &[Attribute]) -> String[src]
pub(crate) fn next_impl_id(&self) -> u32[src]
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for SaveContext<'tcx>
impl<'tcx> !Send for SaveContext<'tcx>
impl<'tcx> !Sync for SaveContext<'tcx>
impl<'tcx> Unpin for SaveContext<'tcx>
impl<'tcx> !UnwindSafe for SaveContext<'tcx>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,