"Operator-equals" are now implementable

Minimum Rust version: 1.8

The various “operator equals” operators, such as += and -=, areimplementable via various traits. For example, to implement += ona type of your own:

1. use std::ops::AddAssign;

3. #[derive(Debug)]
4. struct Count {
5. value: i32,
6. }

8. impl AddAssign for Count {
9. fn add_assign(&mut self, other: Count) {
10. self.value += other.value;
11. }
12. }

14. fn main() {
15. let mut c1 = Count { value: 1 };
16. let c2 = Count { value: 5 };

18. c1 += c2;

20. println!("{:?}", c1);
21. }

This will print Count { value: 6 }.