{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreidifiqf3iq3dtxc2wfndclacog4dfngdkqzjpl2exlgcjcfcueqfi",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mfogho5u3dc2"
},
"path": "/t/pre-rfc-function-parameter-defaults/24011#post_4",
"publishedAt": "2026-02-25T07:41:47.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "What I was thinking of was patterns like axum and bevy use to accept functions of various arities in higher-order methods. (e.g. `routing::get` for axum).\n\nAdding a default to a parameter of a function that's passed to such a higher-order function w/o specifying type params would break compilation due to those type params no longer having one unambiguous substitution at that callsite.\n\nI can post a concrete example later.",
"title": "Pre-RFC: Function parameter defaults"
}