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