rust/src/test/ui/assignment-operator-unimplemented.rs
2018-12-25 21:08:33 -07:00

8 lines
152 B
Rust

struct Foo;
fn main() {
let mut a = Foo;
let ref b = Foo;
a += *b; //~ Error: binary assignment operation `+=` cannot be applied to type `Foo`
}