This is a very old post, but you can encode many uses of typestate pretty easily: http://pcwalton.github.io/blog/2012/12/26/typestate-is-dead/
It'd be great for someone to write a more up-to-date version of this post!
It'd be great for someone to write a more up-to-date version of this post!
Can Rust still do phantom types, and I just can't see them anywhere in the language reference?
struct Foo<T>; // `T` is a phantom type parameter.[0] https://blog.mozilla.org/research/2014/06/23/static-checking...