Add README with description of problem.
This commit is contained in:
parent
2b1b9590c0
commit
0ea2623bfa
16
README.md
Normal file
16
README.md
Normal file
@ -0,0 +1,16 @@
|
||||
# Problem
|
||||
|
||||
Why does the doc test for `sub` under `impl<T> Sub for Point2<T>` work, but my
|
||||
attempt to implement `area` under `impl<T> Bounds2<T>` fails to compile with:
|
||||
|
||||
```
|
||||
error[E0369]: binary operation `-` cannot be applied to type `Point2<T>`
|
||||
--> src/lib.rs:87:28
|
||||
|
|
||||
87 | let d = self.p_max - self.p_min;
|
||||
| ---------- ^ ---------- Point2<T>
|
||||
| |
|
||||
| Point2<T>
|
||||
|
|
||||
= note: an implementation of `std::ops::Sub` might be missing for `Point2<T>`
|
||||
```
|
||||
Loading…
x
Reference in New Issue
Block a user