rustc_parse::parser::attr_wrapper

Function needs_tokens

Source
fn needs_tokens(attrs: &[Attribute]) -> bool
Expand description

Tokens are needed if:

  • 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.