-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Replace Void
in sys
with never type
#84212
Conversation
r? @m-ou-se (rust-highfive has picked a reviewer for you, use r? to override) |
Is there any reason you used r=me either way. @bors delegate+ |
✌️ @CDirkx can now approve this pull request |
📌 Commit d45e131 has been approved by |
⌛ Testing commit d45e131 with merge 6ba82cd054972bbfff8f0d521561ca1d61ee3e74... |
💥 Test timed out |
@bors retry |
⌛ Testing commit d45e131 with merge b5fcd767322b32e3f2a0a2ba597730757a9d19b5... |
💔 Test failed - checks-actions |
Trying again? |
Replace `Void` in `sys` with never type This PR replaces several occurrences in `sys` of the type `enum Void {}` with the Rust never type (`!`). The name `Void` is unfortunate because in other languages (C etc.) it refers to a unit type, not an uninhabited type. Note that the previous stabilization of the never type was reverted, however all uses here are implementation details and not publicly visible.
Rollup of 12 pull requests Successful merges: - rust-lang#84013 (Replace all `fmt.pad` with `debug_struct`) - rust-lang#84119 (Move `sys::vxworks` code to `sys::unix`) - rust-lang#84212 (Replace `Void` in `sys` with never type) - rust-lang#84251 (fix 'const-stable since' for NonZeroU*::new_unchecked) - rust-lang#84301 (Document that `index` and `index_mut` can panic) - rust-lang#84365 (Improve the docstrings of the `Lto` struct.) - rust-lang#84378 (Fix broken doc link) - rust-lang#84379 (Add GAT related tests) - rust-lang#84380 (Write Rustdoc titles like "x in crate::mod - Rust") - rust-lang#84390 (Format `Struct { .. }` on one line even with `{:#?}`.) - rust-lang#84393 (Support `x.py doc std --open`) - rust-lang#84406 (Remove `delete` alias from `mem::drop`.) Failed merges: - rust-lang#84387 (Move `sys_common::poison` to `sync::poison`) r? `@ghost` `@rustbot` modify labels: rollup
This PR replaces several occurrences in
sys
of the typeenum Void {}
with the Rust never type (!
).The name
Void
is unfortunate because in other languages (C etc.) it refers to a unit type, not an uninhabited type.Note that the previous stabilization of the never type was reverted, however all uses here are implementation details and not publicly visible.