Closed
Description
I made a mistake while implementing Add for a type. Instead of using +
for specifying multiple constraints, I accidentally used ,
and for some reason the compiler can't handle this very well. Instead of complaining about the ,
it says that Add is not a Trait
struct Okok<T: Clone>(T);
use std::ops::Add;
impl<T: Clone, Add> Add for Okok<T> {
type Output = usize;
fn add(self, rhs: Self) -> Self::Output {
unimplemented!();
}
}
...
error[E0404]: `Add` is not a trait
--> <anon>:5:21
|
5 | impl<T: Clone, Add> Add for Okok<T> {
| ^^^ not a trait
error: cannot continue compilation due to previous error
This happens on both Nightly, Beta and Stable.