diff options
Diffstat (limited to 'src/test/ui/mismatched_types/assignment-operator-unimplemented.rs')
-rw-r--r-- | src/test/ui/mismatched_types/assignment-operator-unimplemented.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/mismatched_types/assignment-operator-unimplemented.rs b/src/test/ui/mismatched_types/assignment-operator-unimplemented.rs new file mode 100644 index 000000000..21df464d5 --- /dev/null +++ b/src/test/ui/mismatched_types/assignment-operator-unimplemented.rs @@ -0,0 +1,7 @@ +struct Foo; + +fn main() { + let mut a = Foo; + let ref b = Foo; + a += *b; //~ Error: binary assignment operation `+=` cannot be applied to type `Foo` +} |