Hacker News new | past | comments | ask | show | jobs | submit login

> Note that this is distinct from "auto-deref" (or deref coercion), another Rust feature that will automatically dereference pointers as necessary in certain cases, like calling a method on a struct (so there is no arrow operator "->" in Rust like in C++).

Is this actually distinct? The docs for the reference type explicitly says that &T implements Deref for T, so it seems like it's the exact same thing to me.

See https://doc.rust-lang.org/std/primitive.reference.html




> Is this actually distinct?

One is "overload star", the other is "automatically insert & and star", if I'm understanding the distinction that your parent is making.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: