This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a commit to branch 
gh-readonly-queue/main/pr-11342-d6f553299f07f79e46ea9b33f0af8b77afa989e4
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git

commit b3d793a6d4d77cc0038ff0ad3252faa615e8029a
Author: Neil Conway <[email protected]>
AuthorDate: Fri Oct 2 15:27:11 2026 +0000

    chore: Upgrade Rust toolchain to 1.99 (#11342)
    
    # Which issue does this PR close?
    
    - Related to #11340
    
    # Rationale for this change
    
    Update Rust toolchain, fix clippy fallout.
    
    # What changes are included in this PR?
    
    See above.
    
    # Are these changes tested?
    
    Existing tests pass, along with `clippy` and `rustdoc`.
    
    # Are there any significant user-facing changes?
    
    No.
---
 Cargo.toml                                            |  1 +
 arrow-buffer/src/buffer/immutable.rs                  |  2 +-
 arrow-data/src/data.rs                                | 13 +------------
 arrow-flight/src/sql/server.rs                        |  2 ++
 arrow-row/src/variable.rs                             |  2 --
 parquet-geospatial/src/interval.rs                    |  2 --
 parquet-variant/src/decoder.rs                        |  1 +
 parquet/src/arrow/arrow_reader/tests/row_selection.rs |  3 +--
 parquet/src/encodings/decoding/alp_decoder.rs         |  2 --
 parquet/src/file/metadata/writer.rs                   |  6 +++---
 parquet/src/file/properties.rs                        |  3 +++
 parquet/src/file/serialized_reader.rs                 |  4 +---
 parquet/src/file/statistics.rs                        |  2 --
 parquet/src/file/writer.rs                            |  4 ++--
 rust-toolchain.toml                                   |  2 +-
 15 files changed, 17 insertions(+), 32 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index b62eb0ad7d..1bdb54db62 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -219,6 +219,7 @@ wildcard_dependencies = "warn"
 # Lints in `pedantic` that we currently allow.
 # Some of these we should consider enabling in the future.
 # Counts come from `cargo clippy --all-features --all-targets`.
+assert_is_empty = "allow"                    # ~37 violations in ~19 files
 cast_lossless = "allow"                      # ~640 violations in ~100 files
 cast_possible_truncation = "allow"           # ~890 violations in ~190 files
 cast_possible_wrap = "allow"                 # ~570 violations in ~120 files
diff --git a/arrow-buffer/src/buffer/immutable.rs 
b/arrow-buffer/src/buffer/immutable.rs
index 5d2a1f80f4..bd6837aa6a 100644
--- a/arrow-buffer/src/buffer/immutable.rs
+++ b/arrow-buffer/src/buffer/immutable.rs
@@ -789,7 +789,7 @@ mod tests {
     }
 
     #[test]
-    #[expect(clippy::float_cmp)]
+    #[expect(clippy::float_cmp_const)]
     fn test_as_typed_data() {
         check_as_typed_data!(&[1i8, 3i8, 6i8], i8);
         check_as_typed_data!(&[1u8, 3u8, 6u8], u8);
diff --git a/arrow-data/src/data.rs b/arrow-data/src/data.rs
index 065ac59846..7404808a16 100644
--- a/arrow-data/src/data.rs
+++ b/arrow-data/src/data.rs
@@ -1224,12 +1224,10 @@ impl ArrayData {
             DataType::List(field) => {
                 let values_data = 
self.get_single_valid_child_data(field.data_type())?;
                 self.validate_offsets::<i32>(values_data.len)?;
-                Ok(())
             }
             DataType::LargeList(field) => {
                 let values_data = 
self.get_single_valid_child_data(field.data_type())?;
                 self.validate_offsets::<i64>(values_data.len)?;
-                Ok(())
             }
             DataType::Map(field, _) => {
                 let DataType::Struct(entries_fields) = field.data_type() else {
@@ -1253,17 +1251,14 @@ impl ArrayData {
                 }
                 let values_data = 
self.get_single_valid_child_data(field.data_type())?;
                 self.validate_offsets::<i32>(values_data.len)?;
-                Ok(())
             }
             DataType::ListView(field) => {
                 let values_data = 
self.get_single_valid_child_data(field.data_type())?;
                 self.validate_offsets_and_sizes::<i32>(values_data.len)?;
-                Ok(())
             }
             DataType::LargeListView(field) => {
                 let values_data = 
self.get_single_valid_child_data(field.data_type())?;
                 self.validate_offsets_and_sizes::<i64>(values_data.len)?;
-                Ok(())
             }
             DataType::FixedSizeList(field, list_size) => {
                 let values_data = 
self.get_single_valid_child_data(field.data_type())?;
@@ -1285,8 +1280,6 @@ impl ArrayData {
                         values_data.len, self.len, list_size, self.data_type
                     )));
                 }
-
-                Ok(())
             }
             DataType::Struct(fields) => {
                 self.validate_num_child_data(fields.len())?;
@@ -1307,7 +1300,6 @@ impl ArrayData {
                         )));
                     }
                 }
-                Ok(())
             }
             DataType::RunEndEncoded(run_ends_field, values_field) => {
                 self.validate_num_child_data(2)?;
@@ -1324,7 +1316,6 @@ impl ArrayData {
                         "Found null values in run_ends array. The run_ends 
array should not have null values.".to_string(),
                     ));
                 }
-                Ok(())
             }
             DataType::Union(fields, mode) => {
                 self.validate_num_child_data(fields.len())?;
@@ -1343,11 +1334,9 @@ impl ArrayData {
                         }
                     }
                 }
-                Ok(())
             }
             DataType::Dictionary(_key_type, value_type) => {
                 self.get_single_valid_child_data(value_type)?;
-                Ok(())
             }
             _ => {
                 // other types do not have child data
@@ -1358,9 +1347,9 @@ impl ArrayData {
                         self.child_data.len()
                     )));
                 }
-                Ok(())
             }
         }
+        Ok(())
     }
 
     /// Ensures that this array data has a single child_data with the
diff --git a/arrow-flight/src/sql/server.rs b/arrow-flight/src/sql/server.rs
index 6038f84efe..138670e2e0 100644
--- a/arrow-flight/src/sql/server.rs
+++ b/arrow-flight/src/sql/server.rs
@@ -52,6 +52,8 @@ pub(crate) static END_SAVEPOINT: &str = "EndSavepoint";
 pub(crate) static CANCEL_QUERY: &str = "CancelQuery";
 
 /// Implements FlightSqlService to handle the flight sql protocol
+// `async_trait` marks the boxed futures returned by provided methods 
`#[must_use]`
+#[expect(clippy::double_must_use)]
 #[tonic::async_trait]
 pub trait FlightSqlService: Sync + Send + Sized + 'static {
     /// When impl FlightSqlService, you can always set FlightService to Self
diff --git a/arrow-row/src/variable.rs b/arrow-row/src/variable.rs
index 2f0e5f2c35..2ae132c48d 100644
--- a/arrow-row/src/variable.rs
+++ b/arrow-row/src/variable.rs
@@ -204,8 +204,6 @@ fn encode_blocks<const SIZE: usize>(out: &mut [u8], val: 
&[u8]) -> usize {
     let to_write = &mut out[..end_offset];
 
     let (chunks, remainder) = val.as_chunks::<SIZE>();
-    #[expect(clippy::chunks_exact_to_as_chunks)]
-    // Requires using generic parameters in const operations: 
generic_const_exprs
     let to_write_chunks = to_write.chunks_exact_mut(SIZE + 1);
     for (input, output) in chunks.iter().zip(to_write_chunks) {
         let out_block: &mut [u8; SIZE] = (&mut 
output[..SIZE]).try_into().unwrap();
diff --git a/parquet-geospatial/src/interval.rs 
b/parquet-geospatial/src/interval.rs
index 97a84ec00c..5ec05859d9 100644
--- a/parquet-geospatial/src/interval.rs
+++ b/parquet-geospatial/src/interval.rs
@@ -520,8 +520,6 @@ impl IntervalTrait for WraparoundInterval {
 
 #[cfg(test)]
 mod test {
-    use core::f64;
-
     use super::*;
 
     fn test_empty<T: IntervalTrait>(empty: T) {
diff --git a/parquet-variant/src/decoder.rs b/parquet-variant/src/decoder.rs
index b110d056ca..a74790f7bb 100644
--- a/parquet-variant/src/decoder.rs
+++ b/parquet-variant/src/decoder.rs
@@ -445,6 +445,7 @@ mod tests {
         );
     }
 
+    #[expect(clippy::float_cmp_const)]
     mod float {
         use super::*;
 
diff --git a/parquet/src/arrow/arrow_reader/tests/row_selection.rs 
b/parquet/src/arrow/arrow_reader/tests/row_selection.rs
index d9286f84db..55310d0a1c 100644
--- a/parquet/src/arrow/arrow_reader/tests/row_selection.rs
+++ b/parquet/src/arrow/arrow_reader/tests/row_selection.rs
@@ -53,13 +53,12 @@ fn get_expected_batches(
                     if let Some(last_start) = last_start.take() {
                         expected_batches.push(column.slice(last_start, 
row_offset - last_start))
                     }
-                    row_offset += to_read
                 }
                 false => {
                     last_start.get_or_insert(row_offset);
-                    row_offset += to_read
                 }
             }
+            row_offset += to_read;
         }
     }
 
diff --git a/parquet/src/encodings/decoding/alp_decoder.rs 
b/parquet/src/encodings/decoding/alp_decoder.rs
index 3847a57542..47f5edb4d3 100644
--- a/parquet/src/encodings/decoding/alp_decoder.rs
+++ b/parquet/src/encodings/decoding/alp_decoder.rs
@@ -338,8 +338,6 @@ fn decode_range<Value: AlpFloat>(
         cur.exception_positions.len() / std::mem::size_of::<u16>(),
         cur.exception_values.len() / Value::Exact::WIDTH,
     );
-    #[expect(clippy::chunks_exact_to_as_chunks)]
-    // Requires using generic parameters in const operations: 
generic_const_exprs
     let values_chunks = cur.exception_values.chunks_exact(Value::Exact::WIDTH);
     for (pos_chunk, value_chunk) in cur
         .exception_positions
diff --git a/parquet/src/file/metadata/writer.rs 
b/parquet/src/file/metadata/writer.rs
index 3a00f855bc..fcbc63a9c5 100644
--- a/parquet/src/file/metadata/writer.rs
+++ b/parquet/src/file/metadata/writer.rs
@@ -83,7 +83,7 @@ impl<'a, W: Write> ThriftMetadataWriter<'a, W> {
                         column_metadata,
                         row_group_idx,
                         column_idx,
-                        &mut self.buf,
+                        &mut *self.buf,
                     )?;
                     let end_offset = self.buf.bytes_written();
                     // set offset and index for offset index
@@ -117,7 +117,7 @@ impl<'a, W: Write> ThriftMetadataWriter<'a, W> {
                         column_metadata,
                         row_group_idx,
                         column_idx,
-                        &mut self.buf,
+                        &mut *self.buf,
                     )? {
                         let end_offset = self.buf.bytes_written();
                         // set offset and index for offset index
@@ -216,7 +216,7 @@ impl<'a, W: Write> ThriftMetadataWriter<'a, W> {
         // Write file metadata
         let start_pos = self.buf.bytes_written();
         self.object_writer
-            .write_file_metadata(&file_meta, &mut self.buf)?;
+            .write_file_metadata(&file_meta, &mut *self.buf)?;
         let end_pos = self.buf.bytes_written();
 
         // Write footer
diff --git a/parquet/src/file/properties.rs b/parquet/src/file/properties.rs
index 34dc983eac..e658c7edd0 100644
--- a/parquet/src/file/properties.rs
+++ b/parquet/src/file/properties.rs
@@ -2596,6 +2596,7 @@ mod tests {
     }
 
     #[test]
+    #[expect(clippy::float_cmp_const)]
     fn test_bloom_filter_builder_default() {
         let props = BloomFilterProperties::builder().build();
         assert_eq!(props.fpp, DEFAULT_BLOOM_FILTER_FPP);
@@ -2615,6 +2616,7 @@ mod tests {
     }
 
     #[test]
+    #[expect(clippy::float_cmp_const)]
     fn test_bloom_filter_builder_explicit_ndv() {
         let props = 
BloomFilterProperties::builder().with_max_ndv(1000).build();
         assert_eq!(props.fpp, DEFAULT_BLOOM_FILTER_FPP);
@@ -2656,6 +2658,7 @@ mod tests {
     }
 
     #[test]
+    #[expect(clippy::float_cmp_const)]
     fn test_column_specific_implicit_ndv_uses_row_group_size() {
         let custom_row_group_size: usize = 7777;
         let col = ColumnPath::from("col");
diff --git a/parquet/src/file/serialized_reader.rs 
b/parquet/src/file/serialized_reader.rs
index 7345fb9645..aab7bc8ab3 100644
--- a/parquet/src/file/serialized_reader.rs
+++ b/parquet/src/file/serialized_reader.rs
@@ -1154,7 +1154,6 @@ impl<R: ChunkReader> PageReader for 
SerializedPageReader<R> {
                 } else {
                     *page_index += 1;
                 }
-                Ok(())
             }
             SerializedPageReaderState::Pages {
                 page_locations,
@@ -1171,10 +1170,9 @@ impl<R: ChunkReader> PageReader for 
SerializedPageReader<R> {
                         *page_index += 1;
                     }
                 }
-
-                Ok(())
             }
         }
+        Ok(())
     }
 
     fn at_record_boundary(&mut self) -> Result<bool> {
diff --git a/parquet/src/file/statistics.rs b/parquet/src/file/statistics.rs
index fec89a8c29..b7d2206da5 100644
--- a/parquet/src/file/statistics.rs
+++ b/parquet/src/file/statistics.rs
@@ -753,8 +753,6 @@ impl<T: ParquetValueType> fmt::Debug for ValueStatistics<T> 
{
 
 #[cfg(test)]
 mod tests {
-    use core::f32;
-
     use super::*;
 
     #[test]
diff --git a/parquet/src/file/writer.rs b/parquet/src/file/writer.rs
index af60326ca3..7030cb28c6 100644
--- a/parquet/src/file/writer.rs
+++ b/parquet/src/file/writer.rs
@@ -745,7 +745,7 @@ impl<'a, W: Write + Send> SerializedRowGroupWriter<'a, W> {
         let (src_offset, src_length, write_offset) = 
self.begin_appended_column(&close)?;
 
         let mut read = read.take(src_length as _);
-        let write_length = std::io::copy(&mut read, &mut self.buf)?;
+        let write_length = std::io::copy(&mut read, &mut *self.buf)?;
 
         if src_length as u64 != write_length {
             return Err(general_err!(
@@ -1064,7 +1064,7 @@ impl<'a, W: Write> SerializedPageWriter<'a, W> {
                 page_encryptor.encrypt_page_header(&header, sink)?;
             }
             None => {
-                let mut protocol = ThriftCompactOutputProtocol::new(&mut 
self.sink);
+                let mut protocol = ThriftCompactOutputProtocol::new(&mut 
*self.sink);
                 header.write_thrift(&mut protocol)?;
             }
         }
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
index daca2b13f3..e75546c871 100644
--- a/rust-toolchain.toml
+++ b/rust-toolchain.toml
@@ -16,5 +16,5 @@
 # under the License.
 
 [toolchain]
-channel = "1.98.1"
+channel = "1.99.0"
 components = ["rustfmt", "clippy"]

Reply via email to