Repository navigation
test(rust/driver_manager): build the fake statement's private data with ptr::dangling_mut - #8
Merged
Conversation
…th ptr::dangling_mut clippy::manual_dangling_ptr (stable 1.98) rejects `1 as *mut c_void`, failing the Rust workflow's clippy step on every OS.
There was a problem hiding this comment.
Copilot review overview
🟢 Approved
The focused change preserves existing semantics and resolves the reported Clippy failure.
Review effort: Balanced
Findings: None
What changed in this PR
Updates the fake Rust driver’s statement sentinel to satisfy newer Clippy checks without changing behavior.
Changes:
- Replaces a manually constructed dangling pointer with
std::ptr::dangling_mut. - Preserves the non-null, never-dereferenced allocation marker.
| File | Description |
|---|---|
rust/driver_manager/tests/statement_cancel.rs |
Modernizes fake statement private-data initialization. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This was referenced Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the Rust workflow failure on #7:
clippy::manual_dangling_ptr(stable 1.98) rejects the1 as *mut c_voidsentinel thestatement_canceltest's fake driver stores inprivate_data.std::ptr::dangling_mut::<c_void>()is the same non-null, never-dereferenced marker.Evidence:
error: manual creation of a dangling pointer --> driver_manager/tests/statement_cancel.rs:110:42...error: could not compile adbc_driver_manager (test "statement_cancel"). The same error is on thespiceai-maint-24-patchesline (Spice patches on ADBC 24 #5, job 107892394233), so the patch carried it over; it is not an ADBC 24 regression.RUSTFLAGS=-Adead_code cargo +1.98.1 clippy --workspace --all-targets --all-features --locked -- -Dwarnings(the CI step) -> same error at statement_cancel.rs:110:42.Finished, no warnings; the nightly-2026-07-21 clippy step fromci/rust-nightlyis also clean;cargo test -p adbc_driver_manager --test statement_cancel --all-features->ok. 2 passed.