rust/tests/ui/issues/issue-6738.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
462 B
Plaintext
Raw Normal View History

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