Re:Rust Traits Deep Dive, Part 2
by dbaupp on Wednesday June 20, 2018 @09:34AM
(#17355165)
Yep! That's why it's equivalent to Add::add(a, b), not a.add(b). (This was definitely something I had to check, though, and, as you say, a tiny detail that's almost certainly irrelevant to most code that people write.)
[ Parent
| on HN ]
Re:Rust Traits Deep Dive, Part 2
by chrismorgan on Wednesday June 20, 2018 @09:40AM
(#17355213)
Ah, the old days when operators worked by reference… it was much harder to express precisely what the + sugar was back then.
Re:Rust Traits Deep Dive, Part 2
by steveklabnik on Wednesday June 20, 2018 @09:37AM
(#17355186)
See my response to Chris, I actually thought it was! My bad!