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/build/docker/ubuntu-jammy/Dockerfile b/build/docker/ubuntu-jammy/Dockerfile
index a37b7c6..b35111c 100644
--- a/build/docker/ubuntu-jammy/Dockerfile
+++ b/build/docker/ubuntu-jammy/Dockerfile
@@ -272,7 +272,7 @@
USER ${user}
RUN `# Rust dependencies` \
- curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.65.0 -y
+ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.83.0 -y
ENV PATH /home/${user}/.cargo/bin:$PATH
USER root