All the commented lines below are valid. How do multiple &
have the same impact? Does Rust do some magic to interpret multiple &
s?
// All commented code is also valid - wondering how?
let string_a = String::from("String A");
let str_a: &str = &string_a;
// let str_a: &str = &&&&&string_a; // --> this is valid statement
let mut str_option: Option<&str>;
str_option = Some(str_a);
// str_option = Some(&str_a); // --> this is valid statement
// str_option = Some(&&str_a); // --> this is also valid statement