Skip to content

Commit 2d6ecec

Browse files
committed
Clarify a comment.
1 parent 934edc5 commit 2d6ecec

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

compiler/rustc_parse/src/parser/attr_wrapper.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,11 @@ fn make_attr_token_stream(
510510
}
511511

512512
/// Tokens are needed if:
513-
/// - any non-single-segment attributes (other than doc comments) are present; or
514-
/// - any `cfg_attr` attributes are present;
515-
/// - any single-segment, non-builtin attributes are present.
513+
/// - any non-single-segment attributes (other than doc comments) are present,
514+
/// e.g. `rustfmt::skip`; or
515+
/// - any `cfg_attr` attributes are present; or
516+
/// - any single-segment, non-builtin attributes are present, e.g. `derive`,
517+
/// `test`, `global_allocator`.
516518
fn needs_tokens(attrs: &[ast::Attribute]) -> bool {
517519
attrs.iter().any(|attr| match attr.ident() {
518520
None => !attr.is_doc_comment(),

0 commit comments

Comments
 (0)