rustc: middle: lint: use more doc comments
This commit is contained in:
parent
ec0258a381
commit
3f8cc1683b
1 changed files with 16 additions and 16 deletions
|
@ -437,29 +437,29 @@ pub fn get_lint_dict() -> LintDict {
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Context<'a> {
|
struct Context<'a> {
|
||||||
// All known lint modes (string versions)
|
/// All known lint modes (string versions)
|
||||||
dict: LintDict,
|
dict: LintDict,
|
||||||
// Current levels of each lint warning
|
/// Current levels of each lint warning
|
||||||
cur: SmallIntMap<(Level, LintSource)>,
|
cur: SmallIntMap<(Level, LintSource)>,
|
||||||
// context we're checking in (used to access fields like sess)
|
/// Context we're checking in (used to access fields like sess)
|
||||||
tcx: &'a ty::ctxt,
|
tcx: &'a ty::ctxt,
|
||||||
// Items exported by the crate; used by the missing_doc lint.
|
/// Items exported by the crate; used by the missing_doc lint.
|
||||||
exported_items: &'a privacy::ExportedItems,
|
exported_items: &'a privacy::ExportedItems,
|
||||||
// The id of the current `ast::StructDef` being walked.
|
/// The id of the current `ast::StructDef` being walked.
|
||||||
cur_struct_def_id: ast::NodeId,
|
cur_struct_def_id: ast::NodeId,
|
||||||
// Whether some ancestor of the current node was marked
|
/// Whether some ancestor of the current node was marked
|
||||||
// #[doc(hidden)].
|
/// #[doc(hidden)].
|
||||||
is_doc_hidden: bool,
|
is_doc_hidden: bool,
|
||||||
|
|
||||||
// When recursing into an attributed node of the ast which modifies lint
|
/// When recursing into an attributed node of the ast which modifies lint
|
||||||
// levels, this stack keeps track of the previous lint levels of whatever
|
/// levels, this stack keeps track of the previous lint levels of whatever
|
||||||
// was modified.
|
/// was modified.
|
||||||
lint_stack: Vec<(Lint, Level, LintSource)>,
|
lint_stack: Vec<(Lint, Level, LintSource)>,
|
||||||
|
|
||||||
// id of the last visited negated expression
|
/// Id of the last visited negated expression
|
||||||
negated_expr_id: ast::NodeId,
|
negated_expr_id: ast::NodeId,
|
||||||
|
|
||||||
// ids of structs/enums which have been checked for raw_pointer_deriving
|
/// Ids of structs/enums which have been checked for raw_pointer_deriving
|
||||||
checked_raw_pointers: NodeSet,
|
checked_raw_pointers: NodeSet,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -610,8 +610,8 @@ impl<'a> Context<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that every lint from the list of attributes satisfies `f`.
|
/// Check that every lint from the list of attributes satisfies `f`.
|
||||||
// Return true if that's the case. Otherwise return false.
|
/// Return true if that's the case. Otherwise return false.
|
||||||
pub fn each_lint(sess: &session::Session,
|
pub fn each_lint(sess: &session::Session,
|
||||||
attrs: &[ast::Attribute],
|
attrs: &[ast::Attribute],
|
||||||
f: |@ast::MetaItem, Level, InternedString| -> bool)
|
f: |@ast::MetaItem, Level, InternedString| -> bool)
|
||||||
|
@ -645,8 +645,8 @@ pub fn each_lint(sess: &session::Session,
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check from a list of attributes if it contains the appropriate
|
/// Check from a list of attributes if it contains the appropriate
|
||||||
// `#[level(lintname)]` attribute (e.g. `#[allow(dead_code)]).
|
/// `#[level(lintname)]` attribute (e.g. `#[allow(dead_code)]).
|
||||||
pub fn contains_lint(attrs: &[ast::Attribute],
|
pub fn contains_lint(attrs: &[ast::Attribute],
|
||||||
level: Level,
|
level: Level,
|
||||||
lintname: &'static str)
|
lintname: &'static str)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue