You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected to see this the code to be compiled, but it's not:
error[E0741]: `Bar` must be annotated with `#[derive(PartialEq, Eq)]` to be used as the type of a const parameter
--> src\main.rs:16:20
|
16 | fn test<const BAR: Bar>() {}
| ^^^ `Bar` doesn't derive both `PartialEq` and `Eq`
My guess is that the type Arc doesn't implement StructuralPartialEq, and I tried to use the feature newtype to wrap around the Arc, but still not working
So is it a bug or is there some limitations? Is there anyway I can make my code compile?