External Publication
Visit Post

Method auto-(de)ref (and lack of it) in RFC 132 ufcs

Rust Internals [Unofficial] February 25, 2026
Source

bettertree:

you (and I, initially) seem to have made the mistake of forgetting to add & in Foo::foo(var)

There was no mistake, it's a demonstration that introducing auto-ref to non-method coercions can result in calling different functions.

If it only applied to receivers with qualified paths that include the implementing type, so the target type is known... well... it's a lot harder to demonstrate that inserting auto-ref can change semantics, but not impossible. Probably no one relies on it?

Discussion in the ATmosphere

Loading comments...