I want to use int in a generic class which require its generic type to implement the core::cmp::PartialEq trait. I know int is implementing it because I can do 4 != 5. The problem is that the compiler doesn't recognise and fire the following error :
error: unable to infer enough type information to locate the impl of the trait
core::cmp::PartialEq
for the type<generic integer #2>
; type annotations required src/binary_tree.rs:80 let tree = Node::new_node(box 10);src/binary_tree.rs:80:13: 80:27 note: the trait
core::cmp::PartialEq
must be implemented because it is required byNode<T>::new_node
Can you help me to find the implementation of partialeq for int ?