(apologies if this should be on users.rust-lang.org)
The Rust type system is powerful, but, by design, not all-powerful. There are properties that the Rust type system cannot encode (or at least cannot encode well) and quite possibly never will.
There is value in writing refinement type systems or other static analysis tools that take as input a well-typed Rust AST annotated with full type and span information, in order to perform further static analysis from said AST.
Example: A few years ago, I wrote a refinement type system for Rust, implementing Andrew Kennedy's-style units of measure. This was fun, it worked nicely, but it could only work with nightly and, as expected, it broke very quickly with updates to the compiler.
How far are we from having a stable API that could be used for this purpose? Or, if providing a stable API is too much of a burden, a sufficiently-stable export format?