mozilla/rust — pull request #14804 by kmcallister (2014-06-10 23:25:05+00:00)
Title: Convert lints to use a trait-based infrastructure

This untangles each lint's code and state from the overall `Context` and its `Visitor` implementation. It also replaces the `enum Lint` with an "extensible variant" based on the address of a static `Lint` struct.

Actually implementing lint plugins on top of this is only about 30 lines of code, but it's waiting on rust-lang/rfcs#89, so probably won't land for a few weeks.

I'd like to get the non-user-facing parts merged sooner, because it's a generally desirable cleanup, and it's a total pain to rebase across any other lint change.