If you try to use an operator on a type that doesn't implement it, the error include an note similar to this one:
note: an implementation of `std::ops::Add` might be missing for `Foo`
But for three operator, this note is missing:
^
, BitXor
-
, Neg
(the unary negation)
!
, Not
This note is also missing for all the *Assign
version of the operators.
I've made a minimal example with the playground:
https://play.rust-lang.org/?gist=1df2a3964559faed35efb8427d9c3608&version=nightly