]> git.proxmox.com Git - rustc.git/blame - src/test/ui/assignment-operator-unimplemented.stderr
New upstream version 1.57.0+dfsg1
[rustc.git] / src / test / ui / assignment-operator-unimplemented.stderr
CommitLineData
b7449926 1error[E0368]: binary assignment operation `+=` cannot be applied to type `Foo`
0731742a 2 --> $DIR/assignment-operator-unimplemented.rs:6:3
b7449926 3 |
532ac7d7 4LL | a += *b;
b7449926
XL
5 | -^^^^^^
6 | |
7 | cannot use `+=` on type `Foo`
8 |
c295e0f8
XL
9note: an implementation of `AddAssign<_>` might be missing for `Foo`
10 --> $DIR/assignment-operator-unimplemented.rs:1:1
11 |
12LL | struct Foo;
13 | ^^^^^^^^^^^ must implement `AddAssign<_>`
14note: the following trait must be implemented
15 --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
16 |
17LL | / pub trait AddAssign<Rhs = Self> {
18LL | | /// Performs the `+=` operation.
19LL | | ///
20LL | | /// # Example
21... |
22LL | | fn add_assign(&mut self, rhs: Rhs);
23LL | | }
24 | |_^
b7449926
XL
25
26error: aborting due to previous error
27
28For more information about this error, try `rustc --explain E0368`.