3 ms·
> As far as I know the types in Rust are never silently coerced to anything. There are some specific coercion sites and kinds: https://doc.rust-lang.org/refere
by seritools 4y ago
> As far as I know the types in Rust are never silently coerced to anything.
There are some specific coercion sites and kinds: https://doc.rust-lang.org/reference/type-coercions.html https://doc.rust-lang.org/reference/type-coercions.html
- kibwen 4y agoTrue, although coercion in Rust is quite limited (it doesn't even coerce smaller ints into larger ones), and the coercions that exist are pretty harmless IMO (like letting you call a function that accepts a `&foo` if all you have is a `&mut foo`). I suspect they're referring to something else, as I've never seen coercion highlighted as a pain point before.