{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreiajyi2v6pftqkfzvszkfhhbbmup5vpyckbyjwq5bkeb3ealhmseha",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mpotvuh62dw2"
},
"path": "/t/traits-for-function-items/22815#post_11",
"publishedAt": "2026-07-02T19:55:49.000Z",
"site": "https://internals.rust-lang.org",
"tags": [
"@steffahn",
"a ZeroSizedFunction in playground",
"Implementing traits on function pointers - #2 by steffahn - help - The Rust Programming Language Forum"
],
"textContent": "hi @steffahn, do you remember if, at that time (when you wrote a ZeroSizedFunction in playground for Implementing traits on function pointers - #2 by steffahn - help - The Rust Programming Language Forum) the last line of\n\n\n let v = 42;\n // not a nice error message, but the following (if uncommented) doesn’t compile\n let a = (move || println!(\"{:?}\", v)).as_fn();\n\n\nwas refused at compile time, or at runtime? With current `stable` (v. `1.96.1`) it's refused at runtime only! Maybe `rustc` got lazy.",
"title": "Traits for function items"
}