{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreidrfkhmlrwaj2jtydri3swljln6nx7wtcuwcx2rw2a5s2vq33wrc4",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mesem2flw2x2"
},
"path": "/t/method-auto-de-ref-and-lack-of-it-in-rfc-132-ufcs/24005#post_1",
"publishedAt": "2026-02-14T05:16:48.000Z",
"site": "https://internals.rust-lang.org",
"tags": [
"RFC PR",
"the 0.11.0 reference",
"132 ufcs",
"241 deref-conversions",
"`Self` = `T`][[1]",
"[2]",
"2]) is kinda rare such that people know it but haven't bothered enough to write an RFC for it. (There is [RFC 3913",
"RFC 3913, actually. ([Pre-RFC",
"↩︎",
"this `pub trait Quz` hack",
"↩︎"
],
"textContent": "I was a bit upset at RFC 132 for not having auto-(de)ref for recievers.\n\nAfter some research I found:\n\n * Method auto-ref on the dot operator is present around the time of RFC 132 (evidence: code examples in RFC 241). I don't know why its lack in RFC 132 isn't noted at all in the RFC PR. Perhaps RFC processes were just not popular enough then? But I can't find anything in the 0.11.0 reference about method auto-ref on the dot operator, so maybe that feature is just altogether under-noted back then.\n\n * Method auto-_de_ ref semantics is added _after_ RFC 132, so they naturally weren't considered then.\n\nRFC | Started | Merged\n---|---|---\n#132 ufcs | `2014-03-17` | `2014-08-06`\n#241 deref-conversions | `2014-09-16` | `2015-01-21`\n\n\n\n\nSo I guess if #241 deref-conversions was there back then, and method auto-ref semantics were properly documented, then #132 ufcs would have considered it, e.g. add auto-(de)ref for `it` in `T::method(it, ...)` where `fn method(&self, ...)` `Self` = `T`][[1], allowing it to compile with `it: Box<T>`.\n\nSo it seems that ufcs lacking auto-(de)ref is just a historical problem, not something intended.\n\nI guess ufcs (and method disambiguation in general2]) is kinda rare such that people know it but haven't bothered enough to write an RFC for it. (There is RFC 3913, actually. ([Pre-RFC)) And ufcs has been there for 10+ years such that its characteristic of lacking auto-(de)ref might have even been _relied on_. These are all my guesses because I don't use it often too. What do you think of these? Do you have experiences that prove or disprove these statements? And what do you think about adding auto-(de)ref to ufcs now?\n\n* * *\n\n 1. method may be on `T` or on a trait, should be the same anyway ↩︎\n\n 2. including e.g. this `pub trait Quz` hack ↩︎\n\n\n",
"title": "Method auto-(de)ref (and lack of it) in RFC 132 ufcs"
}