Skip to content

std: add doctest to parent_id - #164151

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
RalfJung:parent_id_test
Oct 12, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
RalfJung:parent_id_test

Conversation

@RalfJung

Copy link
Copy Markdown
Member

This operation is currently entirely untested. (I know because it shows up nowhere in the test failures when running the test suite in Miri, and Miri does not support this operation.)

So let's add a test.

@rustbot rustbot added O-unix Operating system: Unix-like 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 Oct 11, 2026
@rustbot

rustbot commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

r? @clarfonthey

rustbot has assigned @clarfonthey.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 13 candidates
  • Random selection from ChrisDenton, JohnTitor, Mark-Simulacrum, clarfonthey

@RalfJung

Copy link
Copy Markdown
Member Author

@rustbot reroll

@rustbot rustbot assigned ChrisDenton and unassigned clarfonthey Oct 11, 2026
@joshtriplett

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 5fd1cb6 has been approved by joshtriplett

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Oct 11, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Oct 11, 2026
…plett

std: add doctest to parent_id

This operation is currently entirely untested. (I know because it shows up nowhere in the test failures when running the test suite in Miri, and Miri does not support this operation.)

So let's add a test.
rust-bors Bot pushed a commit that referenced this pull request Oct 11, 2026
Rollup of 6 pull requests

Successful merges:

 - #160597 (bootstrap: always build llvm's dylib when linking to it)
 - #162810 (vectorized vec::dedup  pre-scan)
 - #162931 (directly deallocates the nodes instead of traversing every element when BTreemap dropping)
 - #162027 (std: add `fs::rename_noreplace`)
 - #164146 (Nuke `Unique` (and `ptr_internals`))
 - #164151 (std: add doctest to parent_id)
@jhpratt

jhpratt commented Oct 12, 2026

Copy link
Copy Markdown
Member

@bors r- #164179 (comment)

---- library\std\src\os\unix\process.rs - os::unix::process::parent_id (line 753) stdout ----
error[E0432]: unresolved import `std::os::unix`
   --> library\std\src\os\unix\process.rs:754:14
    |
754 | use std::os::unix::process;
    |              ^^^^ could not find `unix` in `os`
    |
note: found an item that was configured out
   --> library\std\src\os\mod.rs:50:17
    |
 49 |     target_family = "unix" => {
    |     ---------------------- the item is gated behind the `unix` feature
 50 |         pub mod unix;
    |                 ^^^^

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 12, 2026
@rust-bors

rust-bors Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

This PR was contained in a rollup (#164179), which was unapproved.

View changes since this unapproval

@RalfJung

Copy link
Copy Markdown
Member Author

How is that possible...? The doctest should only exist if we have the unix target feature?

@RalfJung

Copy link
Copy Markdown
Member Author

Apparently this was on aarch64-pc-windows-msvc. The entire file should be completely ignored there, no?

Seems like all the other doctests in std::os::unix have a snippet like this

#[cfg_attr(target_family = "unix", doc = "```")]
#[cfg_attr(not(target_family = "unix"), doc = "```ignore (needs unix)")]

It makes no sense at all to me that this should be needed.

@RalfJung

Copy link
Copy Markdown
Member Author

@bors r=joshtriplett

@rust-bors

rust-bors Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 0103672 has been tentatively approved by joshtriplett

It will be put into the queue for this repository once PR CI succeeds.

@rust-bors rust-bors Bot 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 12, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 12, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #163824 (aarch64: Use neon registers for ABI on targets that require `neon")
 - #162257 (Revise the VEXos synchronization model)
 - #163832 (reject non-async coroutine closures as async callables)
 - #163990 (`AliasConstKind`: add intra-doc links to `AliasTyKind`)
 - #164031 (Adding File Lock Support for Haiku)
 - #164151 (std: add doctest to parent_id)
@rust-bors
rust-bors Bot merged commit 56f02d1 into rust-lang:main Oct 12, 2026
14 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 12, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 12, 2026
Rollup merge of #164151 - RalfJung:parent_id_test, r=joshtriplett

std: add doctest to parent_id

This operation is currently entirely untested. (I know because it shows up nowhere in the test failures when running the test suite in Miri, and Miri does not support this operation.)

So let's add a test.
@theemathas

theemathas commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

It makes no sense at all to me that this should be needed.

@RalfJung This incantation is the correct one. See #162112 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-unix Operating system: Unix-like 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.

7 participants