summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-6738.rs
blob: a2f8dfe9c493cf4fe5b88715faf8391ad9c22c06 (plain)
1
2
3
4
5
6
7
8
9
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() {}