(attrs: &[Attribute], name: &str)
| 17 | } |
| 18 | |
| 19 | fn has_attribute(attrs: &[Attribute], name: &str) -> bool { |
| 20 | attrs.iter().any(|attr| attr.path().is_ident(name)) |
| 21 | } |
| 22 | |
| 23 | // For single character idents a lookup table is the most efficient; |
| 24 | // we only need to store a 256 item table, and direct lookup will be |