diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-6738.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-6738.rs b/src/test/ui/issues/issue-6738.rs new file mode 100644 index 000000000..a2f8dfe9c --- /dev/null +++ b/src/test/ui/issues/issue-6738.rs @@ -0,0 +1,10 @@ +struct Foo<T> { + x: T, +} +impl<T> Foo<T> { + fn add(&mut self, v: Foo<T>){ + self.x += v.x; + //~^ ERROR: binary assignment operation `+=` cannot be applied + } +} +fn main() {} |