Struct clippy_utils::LateContext [−][src]
pub(crate) struct LateContext<'tcx> {
pub tcx: TyCtxt<'tcx>,
pub enclosing_body: Option<BodyId>,
pub(crate) cached_typeck_results: Cell<Option<&'tcx TypeckResults<'tcx>>>,
pub param_env: ParamEnv<'tcx>,
pub access_levels: &'tcx AccessLevels<LocalDefId>,
pub lint_store: &'tcx LintStore,
pub last_node_with_lint_attrs: HirId,
pub generics: Option<&'tcx Generics<'tcx>>,
pub only_module: bool,
}Expand description
Context for lint checking after type checking.
Fields
tcx: TyCtxt<'tcx>Type context we’re checking in.
enclosing_body: Option<BodyId>Current body, or None if outside a body.
cached_typeck_results: Cell<Option<&'tcx TypeckResults<'tcx>>>Type-checking results for the current body. Access using the typeck_results
and maybe_typeck_results methods, which handle querying the typeck results on demand.
param_env: ParamEnv<'tcx>Parameter environment for the item we are in.
access_levels: &'tcx AccessLevels<LocalDefId>Items accessible from the crate being checked.
lint_store: &'tcx LintStoreThe store of registered lints and the lint levels.
last_node_with_lint_attrs: HirIdgenerics: Option<&'tcx Generics<'tcx>>Generic type parameters in scope for the item we are in.
only_module: boolWe are only looking at one module
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for LateContext<'tcx>
impl<'tcx> !Send for LateContext<'tcx>
impl<'tcx> !Sync for LateContext<'tcx>
impl<'tcx> Unpin for LateContext<'tcx>
impl<'tcx> !UnwindSafe for LateContext<'tcx>
Blanket Implementations
Mutably borrows from an owned value. Read more
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