Skip to content

Conversation

@leon-xd
Copy link
Contributor

@leon-xd leon-xd commented May 12, 2025

Rust 1.88 beta includes the unnecessary_transmutes lint. Bindgen generates code that triggers this lint in types.rs. We need to silence this lint for this version of Rust and onwards.

Link to failing pipeline: https://github.com/microsoft/windows-drivers-rs/actions/runs/14955151207/job/42009809414

@leon-xd leon-xd changed the title fix: added conditional for Rust version 1.87 for allowing unnecessary_transmutes warning fix: added conditional for Rust version 1.88 for allowing unnecessary_transmutes warning May 12, 2025
Copy link
Collaborator

@wmmc88 wmmc88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might want to change pr title so its shorter/more succinct. itll make it easier for changelog generation. something like "fix: allow unnecessary_transmutes lint for bindgen-generated types.rs"

@leon-xd leon-xd changed the title fix: added conditional for Rust version 1.88 for allowing unnecessary_transmutes warning fix: allow unnecessary_transmutes lint for bindgen-generated types.rs May 12, 2025
@leon-xd leon-xd added this pull request to the merge queue May 12, 2025
Merged via the queue into microsoft:main with commit 6113802 May 12, 2025
62 checks passed
@leon-xd leon-xd deleted the add-unnecessary-transmutes branch May 12, 2025 18:35
svasista-ms pushed a commit to svasista-ms/windows-drivers-rs that referenced this pull request May 20, 2025
kehan-zhou pushed a commit to kehan-zhou/windows-drivers-rs that referenced this pull request May 21, 2025
svasista-ms added a commit to svasista-ms/windows-drivers-rs that referenced this pull request May 23, 2025
… driver types (as flags)

* refactor(cli): change cargo-wdk new command args to match cargo new command

* fix: replace matches use with match statement, remove redundant full path qualification, flatten is_self_signed_certificate_in_store handling

* fix: add eof to Cargo.lock

* refactor: move get_cargo_metadata into run_from_workspace_root

* refactor: move cargo-wdk-test.lock ignore to top level file

* refactor: disassociate to_target_triple from CpuArchitecture

* chore: map target_triple with target_arch on CI build

* fix: move cargo wdk metadata check to the top and fix test assertion

* fix: target_triple name argument in CI build

* chore: make sure other jobs in the buildmatrix continue while one fails

* fix: change --sample-class to --sample in ci invocation

* docs: fix doc wording in wdk-build

* fix: allow unnecessary_transmutes lint for bindgen-generated types.rs (microsoft#350)

Co-authored-by: leon-xd <[email protected]>

* feat: make `emit_check_cfg_settings` function public (microsoft#352)

* feat: add check for dependecy sorting in Cargo.toml files

* chore: add sort-deps task to local dev makefile

* fix: one time sort of all members of workspace using cargo make sort-deps task

* docs: update Contributing.md about cargo sort usage

* fix: taplo fmt fix of Makefile.toml

* fix: cargo sort check command missing -n option

* fix: imports

* docs: update cargo-wdk README

* refactor: error handling

* fix: match default target against full string instead of just arch part

* chore: cargo sort to particular commit since no new release is made

* refactor(cli): refactor new command

- Introduced DriverType Enum
- Made driver_type an ArgGroup
- Refactored NewCommandArgs. Added flags for driver type and made path the only argument
- Added `get_selected_driver_type` function
- Modified NewAction according to other changes
- Added related tests and docs

* refactor(cli): refactor new command, continued. rebased with integrate-cargo-wdk branch

* - Added consts for driver type string slices
- Renamed cli args structs to `NewArgs` and `BuildArgs` to match "ActionArgs" format
- Other fixes

* - returning Option from `get_selected_driver_type` and removed panic!
- changed errors and tests accordingly

* - changed error message for the "No driver type selected" case
- added an integration test to ensure expected error from Clap is printed when no driver type is passed

---------

Signed-off-by: Shravan Vasista <[email protected]>
Co-authored-by: krishnakumar4a4 <[email protected]>
Co-authored-by: Leon Durrenberger <[email protected]>
Co-authored-by: leon-xd <[email protected]>
Co-authored-by: Melvin Wang <[email protected]>
@leon-xd leon-xd mentioned this pull request Oct 17, 2025
@wmmc88 wmmc88 mentioned this pull request Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants