about summary refs log tree commit diff
path: root/tests/ui/autoref-autoderef/autoderef-box-no-add.stderr
blob: 20ef3352831a4480522e9b44eb558234113f40fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
error[E0369]: cannot add `Box<isize>` to `Box<isize>`
  --> $DIR/autoderef-box-no-add.rs:25: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-box-no-add.rs:31: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`.