Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update windows-bindgen and define INVALID_HANDLE_VALUE ourselves #117656

Merged
merged 2 commits into from
Nov 24, 2023

Conversation

ChrisDenton
Copy link
Member

@ChrisDenton ChrisDenton commented Nov 7, 2023

We generate bindings to the Windows API via the windows-bindgen crate, which is ultimately what's also used to generate the windows-sys and windows crates. However, there currently is some custom sauce just for std which makes it a bit different from the vanilla bindings. I would love for us to reduce and eventually remove the differences entirely so that std is using the exact same bindings as everyone else. Maybe in the future we can even just have a normal dependency on windows-sys.

This PR removes one of those special things. Our definition of INVALID_HANDLE_VALUE relies on an experimental nightly feature for strict provenance, so lets bring that back in house. It also excludes it from the codegen step though that isn't strictly necessary as we override it in any case.

This PR also updates windows-bingen to 0.52.0.

@rustbot
Copy link
Collaborator

rustbot commented Nov 7, 2023

r? @thomcc

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 7, 2023
@rustbot
Copy link
Collaborator

rustbot commented Nov 17, 2023

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@ChrisDenton ChrisDenton changed the title Define INVALID_HANDLE_VALUE ourselves Update windows-bindgen and define INVALID_HANDLE_VALUE ourselves Nov 17, 2023
@thomcc
Copy link
Member

thomcc commented Nov 24, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Nov 24, 2023

📌 Commit 00a12af has been approved by thomcc

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 24, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 24, 2023
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#116807 (Improve rewind documentation)
 - rust-lang#117656 (Update windows-bindgen and define `INVALID_HANDLE_VALUE` ourselves)
 - rust-lang#117940 (chore: remove unnecessary drop)
 - rust-lang#118028 (Document behavior of `<dyn Any as Any>::type_id()`)
 - rust-lang#118060 (Use an absolute path to the NUL device)
 - rust-lang#118224 (Sort unstable items last in rustdoc, instead of first)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7e3ec1b into rust-lang:master Nov 24, 2023
11 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Nov 24, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 24, 2023
Rollup merge of rust-lang#117656 - ChrisDenton:invalid, r=thomcc

Update windows-bindgen and define `INVALID_HANDLE_VALUE` ourselves

We generate bindings to the Windows API via the `windows-bindgen` crate, which is ultimately what's also used to generate the `windows-sys` and `windows` crates. However, there currently is some custom sauce just for std which makes it a bit different from the vanilla bindings. I would love for us to reduce and eventually remove the differences entirely so that std is using the exact same bindings as everyone else. Maybe in the future we can even just have a normal dependency on `windows-sys`.

This PR removes one of those special things. Our definition of `INVALID_HANDLE_VALUE` relies on an experimental nightly feature for strict provenance, so lets bring that back in house. It also excludes it from the codegen step though that isn't strictly necessary as we override it in any case.

This PR also updates windows-bingen to 0.52.0.
@ChrisDenton ChrisDenton deleted the invalid branch November 24, 2023 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Operating system: Windows S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants