Skip to content

Commit 3f8cc16

Browse files
committed
rustc: middle: lint: use more doc comments
1 parent ec0258a commit 3f8cc16

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/librustc/middle/lint.rs

+16-16
Original file line numberDiff line numberDiff line change
@@ -437,29 +437,29 @@ pub fn get_lint_dict() -> LintDict {
437437
}
438438

439439
struct Context<'a> {
440-
// All known lint modes (string versions)
440+
/// All known lint modes (string versions)
441441
dict: LintDict,
442-
// Current levels of each lint warning
442+
/// Current levels of each lint warning
443443
cur: SmallIntMap<(Level, LintSource)>,
444-
// context we're checking in (used to access fields like sess)
444+
/// Context we're checking in (used to access fields like sess)
445445
tcx: &'a ty::ctxt,
446-
// Items exported by the crate; used by the missing_doc lint.
446+
/// Items exported by the crate; used by the missing_doc lint.
447447
exported_items: &'a privacy::ExportedItems,
448-
// The id of the current `ast::StructDef` being walked.
448+
/// The id of the current `ast::StructDef` being walked.
449449
cur_struct_def_id: ast::NodeId,
450-
// Whether some ancestor of the current node was marked
451-
// #[doc(hidden)].
450+
/// Whether some ancestor of the current node was marked
451+
/// #[doc(hidden)].
452452
is_doc_hidden: bool,
453453

454-
// When recursing into an attributed node of the ast which modifies lint
455-
// levels, this stack keeps track of the previous lint levels of whatever
456-
// was modified.
454+
/// When recursing into an attributed node of the ast which modifies lint
455+
/// levels, this stack keeps track of the previous lint levels of whatever
456+
/// was modified.
457457
lint_stack: Vec<(Lint, Level, LintSource)>,
458458

459-
// id of the last visited negated expression
459+
/// Id of the last visited negated expression
460460
negated_expr_id: ast::NodeId,
461461

462-
// ids of structs/enums which have been checked for raw_pointer_deriving
462+
/// Ids of structs/enums which have been checked for raw_pointer_deriving
463463
checked_raw_pointers: NodeSet,
464464
}
465465

@@ -610,8 +610,8 @@ impl<'a> Context<'a> {
610610
}
611611
}
612612

613-
// Check that every lint from the list of attributes satisfies `f`.
614-
// Return true if that's the case. Otherwise return false.
613+
/// Check that every lint from the list of attributes satisfies `f`.
614+
/// Return true if that's the case. Otherwise return false.
615615
pub fn each_lint(sess: &session::Session,
616616
attrs: &[ast::Attribute],
617617
f: |@ast::MetaItem, Level, InternedString| -> bool)
@@ -645,8 +645,8 @@ pub fn each_lint(sess: &session::Session,
645645
true
646646
}
647647

648-
// Check from a list of attributes if it contains the appropriate
649-
// `#[level(lintname)]` attribute (e.g. `#[allow(dead_code)]).
648+
/// Check from a list of attributes if it contains the appropriate
649+
/// `#[level(lintname)]` attribute (e.g. `#[allow(dead_code)]).
650650
pub fn contains_lint(attrs: &[ast::Attribute],
651651
level: Level,
652652
lintname: &'static str)

0 commit comments

Comments
 (0)