2 ms·
> there's no actual way of implementing this sugaring yourself. This is the common case in languages with sugar. Heck, you could consider all of Rust sugar fo
by steveklabnik 2y ago
> there's no actual way of implementing this sugaring yourself.
This is the common case in languages with sugar.
Heck, you could consider all of Rust sugar for MIR...
> There's no way I'd be able to figure out why this happens.
You don't generally need to, but most of this is documented:
https://doc.rust-lang.org/stable/std/iter/index.html#for-loops-and-intoiterator https://doc.rust-lang.org/stable/std/iter/index.html#for-loo...
https://doc.rust-lang.org/stable/std/ops/trait.Add.html#implementing-add-with-generics https://doc.rust-lang.org/stable/std/ops/trait.Add.html#impl...
?'s desugaring isn't documented because the desugaring is subject to change.