@@ -437,29 +437,29 @@ pub fn get_lint_dict() -> LintDict {
437
437
}
438
438
439
439
struct Context < ' a > {
440
- // All known lint modes (string versions)
440
+ /// All known lint modes (string versions)
441
441
dict : LintDict ,
442
- // Current levels of each lint warning
442
+ /// Current levels of each lint warning
443
443
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)
445
445
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.
447
447
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.
449
449
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)].
452
452
is_doc_hidden : bool ,
453
453
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.
457
457
lint_stack : Vec < ( Lint , Level , LintSource ) > ,
458
458
459
- // id of the last visited negated expression
459
+ /// Id of the last visited negated expression
460
460
negated_expr_id : ast:: NodeId ,
461
461
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
463
463
checked_raw_pointers : NodeSet ,
464
464
}
465
465
@@ -610,8 +610,8 @@ impl<'a> Context<'a> {
610
610
}
611
611
}
612
612
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.
615
615
pub fn each_lint ( sess : & session:: Session ,
616
616
attrs : & [ ast:: Attribute ] ,
617
617
f : |@ast:: MetaItem , Level , InternedString | -> bool)
@@ -645,8 +645,8 @@ pub fn each_lint(sess: &session::Session,
645
645
true
646
646
}
647
647
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)]).
650
650
pub fn contains_lint ( attrs : & [ ast:: Attribute ] ,
651
651
level : Level ,
652
652
lintname : & ' static str )
0 commit comments