RFC401 says where the coercions take place, but doesn't mention this case, the "=" assign can also occur coercion. Is this an oversight by rfc or some other issue?
fn main() {
let a = String::from("abc");
let mut b = &a;
let c = String::from("def");
b = &&&&&&c;//just "="
}
The RFCs are a great learning resource in some ways, and also valuable for documenting some technical details that aren't yet properly documented elsewhere. I've read many and cite them frequently. But as a heads-up, it's not uncommon for them to be incomplete or otherwise different from reality. Sometimes stabilized implementation has drifted from the RFC, sometimes RFCs are overrode, abandoned, or only partially implemented, sometimes the language has just evolved, etc.
There's not much transitive coercion for example, and it would be bad for some patterns if there were.
let x: &mut Something = todo!();
// Extremely ambiguous if coercion were actually transitive
let raw = x as *mut _ as *const _;