pub struct SaveContext<'tcx> {
    pub(crate) tcx: TyCtxt<'tcx>,
    pub(crate) maybe_typeck_results: Option<&'tcx TypeckResults<'tcx>>,
    pub(crate) access_levels: &'tcx AccessLevels,
    pub(crate) span_utils: SpanUtils<'tcx>,
    pub(crate) config: Config,
    pub(crate) impl_counter: Cell<u32>,
}

Fields

tcx: TyCtxt<'tcx>maybe_typeck_results: Option<&'tcx TypeckResults<'tcx>>access_levels: &'tcx AccessLevelsspan_utils: SpanUtils<'tcx>config: Configimpl_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).

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

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

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