{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreidxmoli43wbm6b72jgvsogbvuy3xhsykguieh4ysbph4rq4urgjke",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mlev4i57udg2"
},
"path": "/t/type-inference-breaks-when-a-loop-is-added-between-inference-points/24232#post_6",
"publishedAt": "2026-05-08T22:19:30.000Z",
"site": "https://internals.rust-lang.org",
"tags": [
"play.rust-lang.org",
"Rust Playground"
],
"textContent": "This has nothing to do with the loop. I've seen this on many field accesses where the compiler can infer the struct type just fine. Here's a minimal example:\n\nplay.rust-lang.org\n\n### Rust Playground\n\nA browser interface to the Rust compiler to experiment with the language",
"title": "Type inference breaks when a loop is added between inference points"
}