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/lib.rs b/lib/rs/src/lib.rs
index 84c1f9b..2f60188 100644
--- a/lib/rs/src/lib.rs
+++ b/lib/rs/src/lib.rs
@@ -53,7 +53,7 @@
//! [tutorial]: https://github.com/apache/thrift/tree/master/tutorial/rs
#![crate_type = "lib"]
-#![doc(test(attr(allow(unused_variables), deny(warnings))))]
+#![doc(test(attr(allow(unused_variables, dead_code), deny(warnings))))]
#![deny(bare_trait_objects)]
// NOTE: this macro has to be defined before any modules. See: