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/README.md b/build/docker/README.md
index 6b535df..1f67d1d 100644
--- a/build/docker/README.md
+++ b/build/docker/README.md
@@ -196,6 +196,6 @@
| python2 | 2.7.18 | | |
| python3 | 3.8.10 | 3.10.12 | |
| ruby | 2.7.0p0 | 3.0.2p107 | |
-| rust | 1.65.0 | 1.65.0 | |
+| rust | 1.83.0 | 1.83.0 | |
| smalltalk | | | Not in CI |
| swift | 5.7 | 5.7 | |
diff --git a/build/docker/ubuntu-focal/Dockerfile b/build/docker/ubuntu-focal/Dockerfile
index 02f84c6..52ea5a4 100644
--- a/build/docker/ubuntu-focal/Dockerfile
+++ b/build/docker/ubuntu-focal/Dockerfile
@@ -273,7 +273,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
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