{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreif3ungh26i7hemgla6qhw6w3wgq234yxrvbpwofu62msdmbtqqdnu",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mndavf5jp6q2"
},
"path": "/t/pre-rfc-flow-directed-monomorphization-collection-in-mir/24366#post_3",
"publishedAt": "2026-06-02T16:38:59.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "Thanks for your advice!\n\nI have updated the pre-rfc. Link to the paper is attached.\n\nAnd in summary, the motivation is:\n\n * **Finite lowering of hidden type flow.** `impl Trait`, `async fn`, TAIT, and RPITIT introduce opaque but concrete types. A type-flow graph makes their dependence on generic parameters explicit.\n\n * **Closed-world generic dispatch.** A generic `dyn` method such as `encode<T>` is not open-world object-safe, but it may have a finite set of reachable instantiations in a closed world. Flow analysis is the decision procedure for that lowering.\n\n * **Higher-rank and existential-like specialization.** The paper shows that these forms are monomorphizable when type flow has a finite solution; they do not require fundamentally different mechanisms. This makes powerful features possible for rust.\n\n * **Non-finite cases are rejected structurally.** A cycle such as `T ↦ Option<T>` is evidence that specialization does not close; the compiler need not discover this by recursive expansion.\n\n\n",
"title": "[Pre-RFC] Flow-Directed Monomorphization Collection in MIR"
}