rustw does the search bit. We are vaguely thinking about using it for a better source view in rustdoc. That is powered by bits of the RLS which has good knowledge of a program and the types. However, this approach is only really good for a predetermined set of things (code exploration, refactoring, etc.). We don’t have much info about unsafe, for example. So for proper flexibility, you probably need to plug-in to the compiler a bit more. Unfortunately, there is no API for that, so it is likely to be hard work and to get frequently broken by changes.
Is there any reason why you chose to implement this as a lint which gets run by the compiler instead of (for example) something which traverses the Crate AST produced by libsyntax?
The AST doesn’t have any type information or data that the compiler gathers, it only has the syntax, which is not powerful enough for the things that you list.