External Publication
Visit Post

[Pre-RFC] Flow-Directed Monomorphization Collection in MIR

Rust Internals [Unofficial] June 2, 2026
Source

I am not a rustc developer, but I think that the motivation is a bit weak and could use expansion.

You have stated two motivations. One is that infinite recursion will be caught symbolically rather than by overflowing, which will make for slightly better error messages, but doesn’t seem like it would justify introducing a whole new compiler data structure and pass to analyze it.

The other motivation is that “the compiler lacks a uniform representation”. But while more uniform representations may feel elegant, they should only be pursued if they make the code better — easier to maintain, more efficient, or more able to support new features. Could you say more about how this system would, not just be “uniform” and elegant, but help the compiler work better? Perhaps the benefit is in support for “future existential-like encodings” and “future closed-world generic dyn methods”. In that case, perhaps you should put that first and say more about that, including links to where these language features have been proposed.

There should be a link to the paper this idea is from.

Discussion in the ATmosphere

Loading comments...