2018-07-15 14:11:54 -07:00
|
|
|
error[E0368]: binary assignment operation `+=` cannot be applied to type `T`
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/issue-6738.rs:6:9
|
2018-07-15 14:11:54 -07:00
|
|
|
|
|
|
|
|
LL | self.x += v.x;
|
|
|
|
| ------^^^^^^^
|
|
|
|
| |
|
|
|
|
| cannot use `+=` on type `T`
|
|
|
|
|
|
2020-04-07 13:26:09 -07:00
|
|
|
help: consider restricting type parameter `T`
|
|
|
|
|
|
|
|
|
LL | impl<T: std::ops::AddAssign> Foo<T> {
|
2021-06-21 19:07:19 -07:00
|
|
|
| +++++++++++++++++++++
|
2018-07-15 14:11:54 -07:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0368`.
|