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