Skip to content

Commit e0d7955

Browse files
committed
chore(toolchain): bump nightly 2025-10-10 → 2026-01-19
- Replace unstable checked_exact_div with is_multiple_of - Update ArrayChunks::into_remainder Option→direct API - UFCS for exactly_one (44 sites) to avoid unstable_name_collisions - Drop stabilized feature gates (vec_into_raw_parts, vec_deque_pop_if) - Try-block ? conversion fixes (explicit map_err for MetaError/RpcError/StreamError/anyhow) - Fix new clippy lints (replace_box, unnecessary_unwrap, unfulfilled expectations) - Bump ethnum 1.5.0→1.5.3 (patch, fixes E0512 transmute on newer nightlies) Locally verified: cargo check --workspace + cargo clippy --workspace -D warnings both pass with 0 errors on nightly-2026-01-19. NOT locally verified: --all-targets --all-features, lints/ crate, CI.
1 parent ae8f78b commit e0d7955

61 files changed

Lines changed: 226 additions & 228 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ci/rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# 3. (optional) **follow the instructions in `lints/README.md`** to update the toolchain and dependencies for lints
55

66
[toolchain]
7-
channel = "nightly-2025-10-10"
7+
channel = "nightly-2026-01-19"

lints/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lints/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ path = "ui/format_error.rs"
1414
# See `README.md` before bumping the version.
1515
# Remember to update the version in `ci/Dockerfile` as well.
1616
[dependencies]
17-
clippy_utils = { git = "https://github.com/risingwavelabs/clippy", rev="0b9b812ddd1b49a581ae865afde73e7d6365eb8c" }
17+
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev="21e84b5da85f" }
1818
dylint_linting = "=4.1.0"
1919
itertools = "0.14"
2020

lints/rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# See `README.md` before bumping the version.
22

33
[toolchain]
4-
channel = "nightly-2025-10-10"
4+
channel = "nightly-2026-01-19"
55
components = ["llvm-tools-preview", "rustc-dev"]

lints/src/format_error.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use clippy_utils::macros::{
2020
};
2121
use clippy_utils::paths::{PathLookup, PathNS};
2222
use clippy_utils::ty::implements_trait;
23-
use clippy_utils::{is_in_cfg_test, is_in_test_function, is_trait_method};
23+
use clippy_utils::{is_in_cfg_test, is_in_test_function};
2424
use rustc_ast::FormatArgsPiece;
2525
use rustc_hir::{Expr, ExprKind};
2626
use rustc_lint::{LateContext, LateLintPass};
@@ -154,7 +154,12 @@ impl<'tcx> LateLintPass<'tcx> for FormatError {
154154

155155
// `err.to_string()`
156156
if let ExprKind::MethodCall(_, receiver, [], to_string_span) = expr.kind
157-
&& is_trait_method(cx, expr, sym::ToString)
157+
&& cx.typeck_results()
158+
.type_dependent_def_id(expr.hir_id)
159+
.is_some_and(|did| {
160+
let Some(trait_id) = cx.tcx.trait_of_assoc(did) else { return false };
161+
cx.tcx.is_diagnostic_item(sym::ToString, trait_id)
162+
})
158163
{
159164
check_to_string_call(cx, receiver, to_string_span);
160165
}

src/common/src/array/vector_array.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,18 @@ impl VectorArray {
239239
let bitmap: Bitmap = array.get_null_bitmap()?.into();
240240
let encoded_payload = &array.values[0].body;
241241
let payload = decode_vector_payload(
242-
encoded_payload
243-
.len()
244-
.checked_exact_div(size_of::<VectorItemType>())
245-
.unwrap_or_else(|| {
246-
panic!("invalid payload len {} for vector", encoded_payload.len(),)
247-
}),
242+
{
243+
let payload_len = encoded_payload.len();
244+
let elem_size = size_of::<VectorItemType>();
245+
// The payload length must be an exact multiple of the element size.
246+
// Reject (panic) otherwise, instead of silently truncating the count.
247+
// (Equivalent to the previously-used unstable `usize::checked_exact_div`.)
248+
if payload_len.is_multiple_of(elem_size) {
249+
payload_len / elem_size
250+
} else {
251+
panic!("invalid payload len {} for vector", payload_len)
252+
}
253+
},
248254
array.values[0].body.as_slice(),
249255
);
250256
let array_data = array.get_list_array_data()?;

src/common/src/bitmap.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,11 @@ impl Bitmap {
317317
let bitmask = std::simd::Mask::<i8, BITS>::from_array(chunk).to_bitmask() as usize;
318318
bits.push(bitmask);
319319
}
320-
if let Some(remainder_iter) = iter.into_remainder()
321-
&& !remainder_iter.is_empty()
322-
{
320+
// `ArrayChunks::into_remainder` now returns the remainder iterator directly
321+
// (previously `Option<_>`); the full chunks above are already drained via
322+
// `by_ref`, so the remainder is simply empty when the length divides evenly.
323+
let remainder_iter = iter.into_remainder();
324+
if !remainder_iter.is_empty() {
323325
let mut bitmask = 0;
324326
for (i, b) in remainder_iter.enumerate() {
325327
bitmask |= (b as usize) << i;

src/common/src/hash/consistent_hash/mapping.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ impl<T: VnodeMappingItem> VnodeMapping<T> {
245245

246246
/// Returns the item if it's the only item in this mapping, otherwise returns `None`.
247247
pub fn to_single(&self) -> Option<T::Item> {
248-
self.data.iter().copied().dedup().exactly_one().ok()
248+
// UFCS pins this to `itertools::Itertools::exactly_one` (see rust#48919).
249+
Itertools::exactly_one(self.data.iter().copied().dedup()).ok()
249250
}
250251

251252
/// Convert this vnode mapping to a mapping from items to bitmaps, where each bitmap represents

src/common/src/hash/consistent_hash/vnode.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ impl VirtualNode {
153153
keys: &[usize],
154154
vnode_count: usize,
155155
) -> Vec<VirtualNode> {
156-
if let Ok(idx) = keys.iter().exactly_one()
156+
if let Ok(idx) = Itertools::exactly_one(keys.iter())
157157
&& let ArrayImpl::Serial(serial_array) = &**data_chunk.column_at(*idx)
158158
{
159159
return serial_array
@@ -190,7 +190,8 @@ impl VirtualNode {
190190
// `Row`. Similar to `compute_chunk`, it also contains special handling for serial columns.
191191
pub fn compute_row(row: impl Row, indices: &[usize], vnode_count: usize) -> VirtualNode {
192192
let project = row.project(indices);
193-
if let Ok(Some(ScalarRefImpl::Serial(s))) = project.iter().exactly_one().as_ref() {
193+
if let Ok(Some(ScalarRefImpl::Serial(s))) = Itertools::exactly_one(project.iter()).as_ref()
194+
{
194195
return compute_vnode_from_row_id(s.as_row_id(), vnode_count);
195196
}
196197

0 commit comments

Comments
 (0)