Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ resolver = "3"

[workspace.package]
edition = "2024"
rust-version = "1.96.0"
rust-version = "1.97.1"

[workspace.dependencies]
ahash = { version = "0.8.12", default-features = false }
Expand Down
5 changes: 4 additions & 1 deletion bin/ci-builder
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@

set -euo pipefail

NIGHTLY_RUST_DATE=2026-06-01
# 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

workdir=$(pwd)
cd "$(dirname "$0")/.."
Expand Down
25 changes: 14 additions & 11 deletions bin/doc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
# of some unstable niceties, like the `doc_cfg` annotations to indicate in the
# docs what features must be enabled to use an item.
#
# CI always uses a nightly toolchain to run this script. To use one locally:
#
# $ RUSTUP_TOOLCHAIN=nightly bin/doc
# CI runs this script with a nightly toolchain already on the PATH. Run locally,
# it selects the same nightly that `bin/ci-builder` pins, so that local doc builds
# match what CI tests.
#

set -euo pipefail
Expand All @@ -26,13 +26,16 @@ cd "$(dirname "$0")/.."

. misc/shlib/shlib.bash

# The -Z flags are only available in nightly. If running locally using rustup proxy,
# add the +nightly flag, otherwise, assume the caller (CI) is using the correct
# binary. RUSTFLAGS and RUSTDOCFLAGS are toolchain variables, not rustup variables, so we
# need to pass flags via `cargo`
RUSTUP_FLAGS=""
# The -Z flags are only available in nightly. When running locally, `cargo` is the
# rustup proxy, so select the nightly through `RUSTUP_TOOLCHAIN`. In CI, `cargo` is
# the nightly binary itself and ignores that variable.
if [[ -z "${CI+x}" || "$CI" != "true" ]] ; then
RUSTUP_FLAGS="+nightly"
# Pin to the same nightly CI uses. A bare `nightly` resolves to whatever the
# newest nightly is, which drifts from what CI tests and can pick up nightly
# regressions that the pinned date deliberately avoids.
nightly_date=$(sed -n 's/^NIGHTLY_RUST_DATE=\(.*\)$/\1/p' bin/ci-builder)
[[ -n "$nightly_date" ]] || die "could not read NIGHTLY_RUST_DATE from bin/ci-builder"
export RUSTUP_TOOLCHAIN="nightly-$nightly_date"
fi

RUSTDOCFLAGS+=" -D warnings "
Expand All @@ -45,12 +48,12 @@ target=${CARGO_TARGET_DIR:-target}

CARGO_DOC_OUTPUT=$(mktemp)
# TODO: Remove -Zrustdoc-mergeable-info when https://github.com/rust-lang/rust/issues/146895 is fixed
if ! cargo $RUSTUP_FLAGS doc --all-features -Zrustdoc-mergeable-info "$@" 2> "$CARGO_DOC_OUTPUT"; then
if ! cargo doc --all-features -Zrustdoc-mergeable-info "$@" 2> "$CARGO_DOC_OUTPUT"; then
if grep -q "invalid template" "$CARGO_DOC_OUTPUT"; then
echo "Failed due to invalid template, nuking doc directory and retrying from scratch"
rm -f "$CARGO_DOC_OUTPUT"
rm -rf "$target"/doc
cargo $RUSTUP_FLAGS doc --all-features -Zrustdoc-mergeable-info "$@"
cargo doc --all-features -Zrustdoc-mergeable-info "$@"
else
echo "cargo doc failed:"
cat "$CARGO_DOC_OUTPUT"
Expand Down
2 changes: 1 addition & 1 deletion bin/lint-versions
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
#
# lint-versions - Check rust version

grep "rust-version = " Cargo.toml | grep -q "1\.96\.0" || \
grep "rust-version = " Cargo.toml | grep -q "1\.97\.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)
4 changes: 2 additions & 2 deletions src/adapter/src/catalog/apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2020,7 +2020,7 @@ impl CatalogState {
Some(metadata) => metadata.referenced_by.push(entry.id()),
None => panic!(
"Catalog: missing dependent catalog item {} while installing {}",
&u,
u,
self.resolve_full_name(entry.name(), entry.conn_id())
),
}
Expand All @@ -2035,7 +2035,7 @@ impl CatalogState {
Some(metadata) => metadata.used_by.push(entry.id()),
None => panic!(
"Catalog: missing dependent catalog item {} while installing {}",
&u,
u,
self.resolve_full_name(entry.name(), entry.conn_id())
),
}
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/src/coord/timestamp_selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ impl fmt::Display for TimestampExplanation {
" can respond immediately: {}",
self.respond_immediately
)?;
writeln!(f, " timeline: {:?}", &timeline)?;
writeln!(f, " timeline: {:?}", timeline)?;
writeln!(
f,
" session wall time: {:13} ({})",
Expand Down
8 changes: 4 additions & 4 deletions src/avro/src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ impl<'a> SchemaResolver<'a> {
} else {
return Err(SchemaResolutionError::new(format!(
"Fixed schema {:?}: sizes don't match ({}, {}) for field `{}`",
&rs.name,
rs.name,
wsz,
rsz,
self.get_current_human_readable_path(),
Expand All @@ -548,7 +548,7 @@ impl<'a> SchemaResolver<'a> {
if wp != rp {
return Err(SchemaResolutionError::new(format!(
"Decimal schema {:?}: precisions don't match: {}, {} for field `{}`",
&rs.name,
rs.name,
wp,
rp,
self.get_current_human_readable_path(),
Expand All @@ -558,7 +558,7 @@ impl<'a> SchemaResolver<'a> {
if wscale != rscale {
return Err(SchemaResolutionError::new(format!(
"Decimal schema {:?}: sizes don't match: {}, {} for field `{}`",
&rs.name,
rs.name,
wscale,
rscale,
self.get_current_human_readable_path(),
Expand All @@ -568,7 +568,7 @@ impl<'a> SchemaResolver<'a> {
if wsz != rsz {
return Err(SchemaResolutionError::new(format!(
"Decimal schema {:?}: sizes don't match: {:?}, {:?} for field `{}`",
&rs.name,
rs.name,
wsz,
rsz,
self.get_current_human_readable_path(),
Expand Down
4 changes: 2 additions & 2 deletions src/catalog-debug/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ async fn upgrade_check(
let msg = format!(
"catalog upgrade from {} to {} would succeed in about {} ms",
last_seen_version,
&BUILD_INFO.human_version(None),
BUILD_INFO.human_version(None),
dur.as_millis(),
);
println!("{msg}");
Expand Down Expand Up @@ -839,6 +839,6 @@ struct UnescapedDebug(String);

impl std::fmt::Debug for UnescapedDebug {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "'{}'", &self.0)
write!(f, "'{}'", self.0)
}
}
2 changes: 1 addition & 1 deletion src/cloud-resources/src/crd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ async fn register_custom_resource(
field_manager: &str,
) -> Result<(), anyhow::Error> {
let crds = versioned_crds.crds;
let crd_name = format!("{}.{}", &crds[0].spec.names.plural, &crds[0].spec.group);
let crd_name = format!("{}.{}", crds[0].spec.names.plural, crds[0].spec.group);
info!("Registering {} crd", &crd_name);
let crd_api = Api::<CustomResourceDefinition>::all(kube_client);
let mut crd = merge_crds(crds, &versioned_crds.stored_version).unwrap();
Expand Down
7 changes: 7 additions & 0 deletions src/cloud-resources/src/crd/materialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

// The doc comments here become the descriptions in the generated CRD, which the
// docs site renders through Hugo, so they contain shortcodes like
// `{{<warning>}}`. Rustdoc reads the inner `<warning>` as an HTML tag and
// reports it unclosed whenever a shortcode spans more than one Markdown
// paragraph.
#![allow(rustdoc::invalid_html_tags)]

use std::collections::BTreeMap;
use std::time::Duration;

Expand Down
2 changes: 1 addition & 1 deletion src/cloud-resources/src/crd/vpc_endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ mod tests {
assert_eq!(
&crd_json, exported_crd_json,
"VpcEndpoint CRD json does not match exported json.\n\nCRD:\n{}\n\nExported CRD:\n{}",
&crd_json, exported_crd_json,
crd_json, exported_crd_json,
);
}
}
8 changes: 4 additions & 4 deletions src/compute-types/src/explain/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1319,13 +1319,13 @@ impl LinearJoinPlan {
writeln!(
f,
"{}source={{ relation={}, key=[{}] }}",
ctx.indent, &plan.source_relation, source_key
ctx.indent, plan.source_relation, source_key
)?
}
None => writeln!(
f,
"{}source={{ relation={}, raw }}",
ctx.indent, &plan.source_relation
ctx.indent, plan.source_relation
)?,
};
Ok(())
Expand Down Expand Up @@ -1523,13 +1523,13 @@ impl DeltaPathPlan {
writeln!(
f,
"{}source={{ relation={}, key=[{}] }}",
ctx.indent, &plan.source_relation, source_key
ctx.indent, plan.source_relation, source_key
)?
}
None => writeln!(
f,
"{}source={{ relation={}, raw }}",
ctx.indent, &plan.source_relation
ctx.indent, plan.source_relation
)?,
};
Ok(())
Expand Down
10 changes: 5 additions & 5 deletions src/compute/src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ pub fn build_compute_dataflow(
let subscribe_snapshot_optimization =
SUBSCRIBE_SNAPSHOT_OPTIMIZATION.get(&compute_state.worker_config);

let name = format!("Dataflow: {}", &dataflow.debug_name);
let input_name = format!("InputRegion: {}", &dataflow.debug_name);
let build_name = format!("BuildRegion: {}", &dataflow.debug_name);
let name = format!("Dataflow: {}", dataflow.debug_name);
let input_name = format!("InputRegion: {}", dataflow.debug_name);
let build_name = format!("BuildRegion: {}", dataflow.debug_name);

timely_worker.dataflow_core(&name, worker_logging, Box::new(()), |_, scope| {
let scope = scope.with_label();
Expand Down Expand Up @@ -751,7 +751,7 @@ impl<'g> Context<'g, mz_repr::Timestamp> {
panic!(
"Arrangement alarmingly absent! id: {:?}, keys: {:?}",
Id::Global(idx_id),
&key
key
);
}
};
Expand Down Expand Up @@ -853,7 +853,7 @@ where
panic!(
"Arrangement alarmingly absent! id: {:?}, keys: {:?}",
Id::Global(idx_id),
&key,
key,
);
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/environmentd/src/http/console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ pub(crate) async fn handle_internal_console(
path_query = stripped_path_query;
}

let uri = Uri::try_from(format!("{}{}", &console_config.url, path_query)).unwrap();
let uri = Uri::try_from(format!("{}{}", console_config.url, path_query)).unwrap();
let host = uri.host().unwrap().to_string();
// Preserve the request, but update the URI to point upstream.
*req.uri_mut() = uri;
Expand Down
2 changes: 1 addition & 1 deletion src/environmentd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ impl Listener<SqlListenerConfig> {
impl Listener<HttpListenerConfig> {
#[instrument(name = "environmentd::serve_http")]
pub async fn serve_http(self, config: HttpConfig) -> ListenerHandle {
let task_name = format!("{}_http_server", &config.source);
let task_name = format!("{}_http_server", config.source);
task::spawn(|| task_name, {
let http_server = HttpServer::new(config);
mz_server_core::serve(ServeConfig {
Expand Down
Loading
Loading