X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_lint%2Fsrc%2Flevels.rs;h=cca36913dea113650269b7376a8bef5b31da5c31;hb=1d3f5b49d6bdfb2a051ddbfb7ad4b4ad603e9908;hp=09dfb1022d857205b5699e6f9b46a2843d5efb29;hpb=af669c26846f85fd15e34a6f03d5d2f237444c17;p=rust.git diff --git a/compiler/rustc_lint/src/levels.rs b/compiler/rustc_lint/src/levels.rs index 09dfb1022d8..cca36913dea 100644 --- a/compiler/rustc_lint/src/levels.rs +++ b/compiler/rustc_lint/src/levels.rs @@ -50,7 +50,7 @@ struct LintStackIndex { } } -/// Specifications found at this position in the stack. This map only represents the lints +/// Specifications found at this position in the stack. This map only represents the lints /// found for one set of attributes (like `shallow_lint_levels_on` does). /// /// We store the level specifications as a linked list. @@ -163,7 +163,7 @@ fn shallow_lint_levels_on(tcx: TyCtxt<'_>, owner: hir::OwnerId) -> ShallowLintLe match attrs.map.range(..) { // There is only something to do if there are attributes at all. [] => {} - // Most of the time, there is only one attribute. Avoid fetching HIR in that case. + // Most of the time, there is only one attribute. Avoid fetching HIR in that case. [(local_id, _)] => levels.add_id(HirId { owner, local_id: *local_id }), // Otherwise, we need to visit the attributes in source code order, so we fetch HIR and do // a standard visit.