THRIFT-5819: use latest rustc version for rustlib (#3085)

Client: rust

This upgrades the version of rust in the rust-toolchain file, docs and dockerfiles. Doing so requires a few changes to the source, mainly to fix or silence new warnings.

Submitted on behalf of a third-party: Jiayu Liu
Derived from the following PR: https://github.com/apache/thrift/pull/3045

Co-authored-by: Jiayu Liu <jiayu@hey.com>
diff --git a/lib/rs/src/protocol/compact.rs b/lib/rs/src/protocol/compact.rs
index c0c4372..8ed4e06 100644
--- a/lib/rs/src/protocol/compact.rs
+++ b/lib/rs/src/protocol/compact.rs
@@ -681,8 +681,6 @@
 #[cfg(test)]
 mod tests {
 
-    use std::i32;
-
     use crate::protocol::{
         TFieldIdentifier, TInputProtocol, TListIdentifier, TMapIdentifier, TMessageIdentifier,
         TMessageType, TOutputProtocol, TSetIdentifier, TStructIdentifier, TType,
@@ -2818,7 +2816,7 @@
         copy_write_buffer_to_read_buffer!(o_prot);
 
         let read_double = i_prot.read_double().unwrap();
-        assert!(read_double - double < std::f64::EPSILON);
+        assert!((read_double - double).abs() < f64::EPSILON);
     }
 
     #[test]