mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Clarify a comment.
This commit is contained in:
parent
6b678c57b6
commit
deab741ab4
@ -510,9 +510,11 @@ fn make_attr_token_stream(
|
||||
}
|
||||
|
||||
/// Tokens are needed if:
|
||||
/// - any non-single-segment attributes (other than doc comments) are present; or
|
||||
/// - any `cfg_attr` attributes are present;
|
||||
/// - any single-segment, non-builtin attributes are present.
|
||||
/// - any non-single-segment attributes (other than doc comments) are present,
|
||||
/// e.g. `rustfmt::skip`; or
|
||||
/// - any `cfg_attr` attributes are present; or
|
||||
/// - any single-segment, non-builtin attributes are present, e.g. `derive`,
|
||||
/// `test`, `global_allocator`.
|
||||
fn needs_tokens(attrs: &[ast::Attribute]) -> bool {
|
||||
attrs.iter().any(|attr| match attr.ident() {
|
||||
None => !attr.is_doc_comment(),
|
||||
|
Loading…
Reference in New Issue
Block a user