Struct rustc::lint::LateContext [] [src]

pub struct LateContext<'a, 'tcx: 'a> {
    pub tcx: TyCtxt<'a, 'tcx, 'tcx>,
    pub tables: &'a TypeckTables<'tcx>,
    pub krate: &'a Crate,
    pub access_levels: &'a AccessLevels,
    // some fields omitted
}
🔬 This is a nightly-only experimental API.   (rustc_private)

Context for lint checking after type checking.

Fields

🔬 This is a nightly-only experimental API.   (rustc_private)

Type context we're checking in.

🔬 This is a nightly-only experimental API.   (rustc_private)

Side-tables for the body we are in.

🔬 This is a nightly-only experimental API.   (rustc_private)

The crate being checked.

🔬 This is a nightly-only experimental API.   (rustc_private)

Items accessible from the crate being checked.

Trait Implementations

impl<'a, 'tcx> LintContext<'tcx> for LateContext<'a, 'tcx>
[src]

🔬 This is a nightly-only experimental API.   (rustc_private)

Get the overall compiler Session object.

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

Get the level of lint at the current position of the lint traversal. Read more

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

Emit a lint at the appropriate level, for a particular span.

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

Emit a lint and note at the appropriate level, for a particular span.

🔬 This is a nightly-only experimental API.   (rustc_private)

Emit a lint and help at the appropriate level, for a particular span.

🔬 This is a nightly-only experimental API.   (rustc_private)

Emit a lint at the appropriate level, with no associated span.

🔬 This is a nightly-only experimental API.   (rustc_private)

Merge the lints specified by any lint attributes into the current lint context, call the provided function, then reset the lints in effect to their previous state. Read more

impl<'a, 'tcx> Visitor<'tcx> for LateContext<'a, 'tcx>
[src]

🔬 This is a nightly-only experimental API.   (rustc_private)

Because lints are scoped lexically, we want to walk nested items in the context of the outer item, so enable deep-walking.

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

Invoked to visit the body of a function, method or closure. Like visit_nested_item, does nothing by default unless you override nested_visit_map to return Some(_), in which case it will walk the body. Read more

🔬 This is a nightly-only experimental API.   (rustc_private)

Visit the top-level item and (optionally) nested items / impl items. See visit_nested_item for details. Read more

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

Invoked when a nested item is encountered. By default does nothing unless you override nested_visit_map to return Some(_), in which case it will walk the item. You probably don't want to override this method -- instead, override nested_visit_map or use the "shallow" or "deep" visit patterns described on itemlikevisit::ItemLikeVisitor. The only reason to override this method is if you want a nested pattern but cannot supply a Map; see nested_visit_map for advice. Read more

🔬 This is a nightly-only experimental API.   (rustc_private)

Like visit_nested_item(), but for trait items. See visit_nested_item() for advice on when to override this method. Read more

🔬 This is a nightly-only experimental API.   (rustc_private)

Like visit_nested_item(), but for impl items. See visit_nested_item() for advice on when to override this method. Read more

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

When invoking visit_all_item_likes(), you need to supply an item-like visitor. This method converts a "intra-visit" visitor into an item-like visitor that walks the entire tree. If you use this, you probably don't want to process the contents of nested item-like things, since the outer loop will visit them as well. Read more

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)

🔬 This is a nightly-only experimental API.   (rustc_private)