Struct rustc_save_analysis::SaveContext [−][src]
pub struct SaveContext<'tcx> {
tcx: TyCtxt<'tcx>,
maybe_typeck_results: Option<&'tcx TypeckResults<'tcx>>,
access_levels: &'tcx AccessLevels,
span_utils: SpanUtils<'tcx>,
config: Config,
impl_counter: Cell<u32>,
}
Fields
tcx: TyCtxt<'tcx>
maybe_typeck_results: Option<&'tcx TypeckResults<'tcx>>
access_levels: &'tcx AccessLevels
span_utils: SpanUtils<'tcx>
config: Config
impl_counter: Cell<u32>
Implementations
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 fn get_path_segment_data_with_id(
&self,
path_seg: &PathSegment<'_>,
id: HirId
) -> Option<Ref>
pub fn get_field_ref_data(
&self,
field_ref: &ExprField<'_>,
variant: &VariantDef
) -> Option<Ref>
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.
FIXME: DumpVisitor::process_macro_use
should actually dump this data
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
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 72 bytes