It may be better to use [`middle::lint::each_lint`](http://static.rust-lang.org/doc/master/rustc/middle/lint/fn.each_lint.html) to find lint attributes with the `allow` level, and you could in theory use `get_lint_dict` to avoid using a constant for the name, but that's probably just too painful (I'd just use a static).