I have a talk where I turn "you called a function from the wrong thread" into something caught by the type checker in C. Getting an error message at compile time pointing out the specific line with an error, rather than segfaulting at a later point in roughly 2/3 of executions, is a big improvement in developer experience.
Slides here: https://github.com/dlthomas/using-c-types-talk/tree/master/s...
The example is a toy but the technique was developed for (and very successfully used in) a production setting.