In stdlib string.rs:
impl Add<&str> for String {
type Output = String;
#[inline]
fn add(mut self, other: &str) -> String {
self.push_str(other);
self
}
}
let s1 = String::from("tic");
let s2 = String::from("tac");
let s = s1 + &s2;// it works
s1 is immutable here, but Add::add(mut self, other: &str) is mut, I just want to know why.