FWIW, I think this is much slower than necessary: it would be faster if we were to map `attr` to a `&'static str` and compared that with the name directly, since that would be doing a `match` on an enum (very fast) and then a single string comparison, rather than matching on a string (a series of linear string comparisons, AFAIK) and comparing an enum.