Maybe this could be

```rust
static ATTR_WHITELIST: &'static [&'static str] = [
    // rustdoc
    "automatically_derived", "doc",

    // trans
    "address_insignificant",
    // ...
];

// ...
for attr in attrs.iter() {
    for name in ATTR_WHITELIST.iter() {
        if attr.check_name(*name) {
            break // can't have two different names at once.
        }
    }

    if !attr:is_used(attr) {
        cx.span_lint(...);
    }
}
```