mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
2a6a42329f
Make it easy for developers to understand why the binop cannot be applied. fixes #125631
32 lines
1000 B
Plaintext
32 lines
1000 B
Plaintext
error[E0369]: cannot add `Box<isize>` to `Box<isize>`
|
|
--> $DIR/autoderef-full-lval.rs:15:24
|
|
|
|
|
LL | let z: isize = a.x + b.y;
|
|
| --- ^ --- Box<isize>
|
|
| |
|
|
| Box<isize>
|
|
|
|
|
note: the foreign item type `Box<isize>` doesn't implement `Add`
|
|
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
|
|
::: $SRC_DIR/alloc/src/boxed.rs:LL:COL
|
|
|
|
|
= note: not implement `Add`
|
|
|
|
error[E0369]: cannot add `Box<isize>` to `Box<isize>`
|
|
--> $DIR/autoderef-full-lval.rs:21:33
|
|
|
|
|
LL | let answer: isize = forty.a + two.a;
|
|
| ------- ^ ----- Box<isize>
|
|
| |
|
|
| Box<isize>
|
|
|
|
|
note: the foreign item type `Box<isize>` doesn't implement `Add`
|
|
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
|
|
::: $SRC_DIR/alloc/src/boxed.rs:LL:COL
|
|
|
|
|
= note: not implement `Add`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0369`.
|