[std::cmp] add missing docs and provide an example
auto merge of #12956 : killerswan/rust/docs, r=alexcrichton