Skip to content

Update windows-bindgen and define INVALID_HANDLE_VALUE ourselves - #117656

Merged
bors merged 2 commits into
rust-lang:masterfrom
ChrisDenton:invalid
Nov 24, 2023
Merged

Update windows-bindgen and define INVALID_HANDLE_VALUE ourselves#117656
bors merged 2 commits into
rust-lang:masterfrom
ChrisDenton:invalid

Conversation

@ChrisDenton

@ChrisDentonChrisDenton commented Nov 7, 2023

Copy link
Copy Markdown
Member

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
Copy Markdown
Collaborator

r? @thomcc

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

@rustbotrustbot 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
Copy Markdown
Collaborator

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.

@ChrisDentonChrisDenton changed the title Define INVALID_HANDLE_VALUE ourselvesUpdate windows-bindgen and define INVALID_HANDLE_VALUE ourselvesNov 17, 2023
@thomcc

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Nov 24, 2023

Copy link
Copy Markdown
Collaborator

📌 Commit 00a12af has been approved by thomcc

It is now in the queue for this repository.

@borsbors 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:masterNov 24, 2023
@rustbotrustbot 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-windowsOperating system: WindowsS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-libsRelevant 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

@ChrisDenton@rustbot@thomcc@bors