What is the canonical name for "auto-deref"?

I've been thinking of contributing to the Rust reference, and one thing I've noticed is there is no consistent name for the "auto-deref" feature.

I've seen the following descriptions being used:

Is there an agreed upon name for this feature?

I feel that using consistent terminology can improve understandability.

1 Like

Method lookup is just another feature. It's still autoderef on let bar = foo.bar; where foo is &'a Arc<Foo>.

Thanks for the response, yeah I understand that field expressions also use the "auto-deref" feature.

Am I right in understanding that method lookup is a feature that uses auto-deref, but that they are not equivalent?

Is the canonicial name for the automatic dereference and reference feature just called "auto-deref" then?

Another name is "auto-dereferencing".

Deref coercion is related, but not quite the same (it allows coercing a &String to a &str for example).

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.