From 75db7b9f8e8acc1cd4b464fa463be309b3ee9e84 Mon Sep 17 00:00:00 2001 From: Moritz Hoffmann Date: Wed, 2 Sep 2026 11:17:44 +0200 Subject: [PATCH] Bump Rust to 1.98.1 and the CI nightly to 2026-09-02 CI derives its stable toolchain from the `rust-version` field in the root `Cargo.toml`, so that field is what decides which warnings CI can see. Holding it at 1.97.1 meant the lints Rust 1.98 introduced only showed up when someone built locally. Raising it to 1.98.1 closes that gap. Cargo.lock needs no change, which matters because the doc test job resolves with `--locked`. The pin skips 1.98.0, which miscompiles some `dyn Trait` calls into a null vtable slot. rustc 1.98.0 can decide that an impl's predicates are impossible when they involve associated-type projections plus an opaque type, emit `VtblEntry::Vacant` for that impl's method, and leave a zero in the method slot of a compiler-generated vtable, after which safe code dispatches through a null pointer. The bug is rust-lang/rust#161441, and the fix reached stable in the 1.98.1 point release. Running the self-contained reproducer from that issue on `x86_64-unknown-linux-gnu` under edition 2024 confirms the difference: 1.98.0 aborts with SIGILL at `-O` and SIGSEGV without it, while 1.98.1 runs to completion in both profiles. A green CI run on 1.98.0 would not have ruled the tree out, because rustc emits the bad vtable with no diagnostic. Rust 1.98.1 uses LLVM 22.1.8, matching the `clang-22`, `lld-22`, and `llvm-22` packages the CI builder image already installs, so the Dockerfile needs no accompanying change. The comment on that apt stanza asks for the two to move together, and they still agree. Bumping `rust-version` does change the builder image tag, because the tag hashes the build arguments and `RUST_VERSION` is one of them. `ci/mkpipeline.sh` detects the missing tag and inserts bootstrap steps that build and push the stable, min, and console flavors for both architectures, so the first build on this branch will be slow but needs no manual intervention. The nightly pin moves to 2026-09-02. The note that pinned it to 2026-08-02 pointed at rust-lang/rust#160439, a rustdoc hang that broke the Doctests job, and that issue was closed as completed on 2026-08-06. The note is removed rather than reworded, because the constraint it described no longer exists. Advancing the nightly does make rustdoc's `redundant_explicit_links` lint fire, and `bin/doc` runs with `RUSTDOCFLAGS=-D warnings`, so those become errors. Eight doc comments in `mz-avro` and `mz-pgtest` spell an intra-doc link as a label plus an explicit legacy HTML path that resolves to the same destination. Dropping the explicit target is the rewrite rustdoc itself suggests, and every referenced item is in scope at the link site. The `flush` links in the Avro writer keep their explicit targets, because a fragment path is not redundant with its label and rustdoc does not flag them. `bin/lint-versions` records the Rust version that has been checked for compilation time regressions, and it is updated here so `bin/lint` passes. That validation has not been performed. Team Testing should confirm 1.98.1 before this merges. Co-Authored-By: Claude Opus 5 (1M context) --- Cargo.toml | 2 +- bin/ci-builder | 5 +---- bin/lint-versions | 2 +- src/avro/src/reader.rs | 2 +- src/avro/src/types.rs | 2 +- src/avro/src/writer.rs | 2 +- src/pgtest/src/lib.rs | 10 +++++----- 7 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 526ab41cc33cd..5732d33995107 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -266,7 +266,7 @@ resolver = "3" [workspace.package] edition = "2024" -rust-version = "1.97.1" +rust-version = "1.98.1" [workspace.dependencies] ahash = { version = "0.8.12", default-features = false } diff --git a/bin/ci-builder b/bin/ci-builder index 2aa0816ff0fc6..f911f7d66d9cd 100755 --- a/bin/ci-builder +++ b/bin/ci-builder @@ -16,10 +16,7 @@ set -euo pipefail -# NOTE: The 2026-08-03 nightly makes rustdoc run out of memory, which breaks the -# Doctests job. Do not advance past 2026-08-02 until that is fixed. -# See https://github.com/rust-lang/rust/issues/160439. -NIGHTLY_RUST_DATE=2026-08-02 +NIGHTLY_RUST_DATE=2026-09-02 workdir=$(pwd) cd "$(dirname "$0")/.." diff --git a/bin/lint-versions b/bin/lint-versions index 83c76b5bc6b33..b528fe14fcf63 100755 --- a/bin/lint-versions +++ b/bin/lint-versions @@ -11,5 +11,5 @@ # # lint-versions - Check rust version -grep "rust-version = " Cargo.toml | grep -q "1\.97\.1" || \ +grep "rust-version = " Cargo.toml | grep -q "1\.98\.1" || \ (echo "Please validate new Rust versions for compilation time performance regressions or ask Team Testing to do so. Afterwards change the tested version in bin/lint-versions" && exit 1) diff --git a/src/avro/src/reader.rs b/src/avro/src/reader.rs index f2bb1a7e2b402..f3cb6293c7ccf 100644 --- a/src/avro/src/reader.rs +++ b/src/avro/src/reader.rs @@ -961,7 +961,7 @@ impl<'a> SchemaResolver<'a> { /// In case a reader `Schema` is provided, schema resolution will also be performed. /// /// **NOTE** This function has a quite small niche of usage and does NOT take care of reading the -/// header and consecutive data blocks; use [`Reader`](struct.Reader.html) if you don't know what +/// header and consecutive data blocks; use [`Reader`] if you don't know what /// you are doing, instead. pub fn from_avro_datum(schema: &Schema, reader: &mut R) -> Result { let value = decode(schema.top_node(), reader)?; diff --git a/src/avro/src/types.rs b/src/avro/src/types.rs index 7e9756ded225d..62846f1743451 100644 --- a/src/avro/src/types.rs +++ b/src/avro/src/types.rs @@ -166,7 +166,7 @@ pub enum Value { Uuid(uuid::Uuid), } -/// Any structure implementing the [ToAvro](trait.ToAvro.html) trait will be usable +/// Any structure implementing the [ToAvro] trait will be usable /// from a [Writer](../writer/struct.Writer.html). pub trait ToAvro { /// Transforms this value into an Avro-compatible [`Value`]. diff --git a/src/avro/src/writer.rs b/src/avro/src/writer.rs index 0715e811a7410..101ccabf77f94 100644 --- a/src/avro/src/writer.rs +++ b/src/avro/src/writer.rs @@ -356,7 +356,7 @@ fn write_value_ref(schema: &Schema, value: &Value, buffer: &mut Vec) -> Resu /// performing schema validation. /// /// **NOTE** This function has a quite small niche of usage and does NOT generate headers and sync -/// markers; use [`Writer`](struct.Writer.html) to be fully Avro-compatible if you don't know what +/// markers; use [`Writer`] to be fully Avro-compatible if you don't know what /// you are doing, instead. pub fn to_avro_datum(schema: &Schema, value: T) -> Result, Error> { let mut buffer = Vec::new(); diff --git a/src/pgtest/src/lib.rs b/src/pgtest/src/lib.rs index c73fe810298f4..0ab4015c1bf17 100644 --- a/src/pgtest/src/lib.rs +++ b/src/pgtest/src/lib.rs @@ -27,11 +27,11 @@ //! messages sent and received. //! //! Supported `send` types: -//! - [`Query`](struct.Query.html) -//! - [`Parse`](struct.Parse.html) -//! - [`Describe`](struct.Describe.html) -//! - [`Bind`](struct.Bind.html) -//! - [`Execute`](struct.Execute.html) +//! - [`Query`] +//! - [`Parse`] +//! - [`Describe`] +//! - [`Bind`] +//! - [`Execute`] //! - `Sync` //! //! Supported `until` arguments: