Struct rustc_trans::lint::ContextUnstable
[-] [+]
[src]
pub struct Context<'a, 'tcx> where 'tcx: 'a {
pub tcx: &'a ctxt<'tcx>,
pub krate: &'a Crate,
pub exported_items: &'a HashSet<u32, DefaultState<FnvHasher>>,
// some fields omitted
}
Context for lint checking.
Fields
tcx | Type context we're checking in. |
krate | The crate being checked. |
exported_items | Items exported from the crate being checked. |
Methods
impl<'a, 'tcx> Context<'a, 'tcx>
fn sess(&'a self) -> &'a Session
Get the overall compiler Session
object.
fn current_level(&self, lint: &'static Lint) -> Level
Get the level of lint
at the current position of the lint
traversal.
fn lint(&self, lint: &'static Lint, msg: &str)
Emit a lint at the appropriate level, with no associated span.
fn span_lint(&self, lint: &'static Lint, span: Span, msg: &str)
Emit a lint at the appropriate level, for a particular span.