//! The lint checking is mostly consolidated into one pass which runs
//! after all other analyses. Throughout compilation, lint warnings
//! can be added via the `add_lint` method on the Session structure. This
-//! requires a span and an id of the node that the lint is being added to. The
+//! requires a span and an ID of the node that the lint is being added to. The
//! lint isn't actually emitted at that time because it is unknown what the
//! actual lint level at that location is.
//!
//! A context keeps track of the current state of all lint levels.
//! Upon entering a node of the ast which can modify the lint settings, the
//! previous lint state is pushed onto a stack and the ast is then recursed
-//! upon. As the ast is traversed, this keeps track of the current lint level
+//! upon. As the ast is traversed, this keeps track of the current lint level
//! for all lint attributes.
use self::TargetLint::*;
impl<'a, 'tcx> LintContext<'tcx> for LateContext<'a, 'tcx> {
type PassObject = LateLintPassObject;
- /// Get the overall compiler `Session` object.
+ /// Gets the overall compiler `Session` object.
fn sess(&self) -> &Session {
&self.tcx.sess
}
impl<'a> LintContext<'a> for EarlyContext<'a> {
type PassObject = EarlyLintPassObject;
- /// Get the overall compiler `Session` object.
+ /// Gets the overall compiler `Session` object.
fn sess(&self) -> &Session {
&self.sess
}
}
-/// Perform lint checking on a crate.
+/// Performs lint checking on a crate.
///
/// Consumes the `lint_store` field of the `Session`.
pub fn check_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {