Possible bug with operator overloading on traits/associated types #52025
Closed
Description
opened on Jul 3, 2018
See the following playground code:
https://play.rust-lang.org/?gist=bf70f00b6d1998921a4571bd331f6530
If you run it, it works. There are two bits commented out, a trait bounds for an Add<f32>
and an
operator overload for Add<f32>
. If you put those back in, you get an error trying to use the + operator.
It seems like the 2nd Add trait bound nullifies the first.
This occurs with 1.27stable and nightly as of this post. Ubuntu.
Activity