Skip to content

std: make a lot of items crate private - #161612

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
pacak:unreachable-pub
Sep 15, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
pacak:unreachable-pub

Conversation

@pacak

@pacak pacak commented Aug 23, 2026

Copy link
Copy Markdown
Contributor
  1. Added #![warn(unreachable_pub)] in library/std/src/lib.rs
  2. Added #[allow(unreachable_pub)] on top of std::os and std::sys specifically.

View all comments

r? clarfonthey

@rustbot rustbot added the O-unix Operating system: Unix-like label Aug 23, 2026
@rustbot rustbot added 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 Aug 23, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@pacak
pacak force-pushed the unreachable-pub branch 2 times, most recently from af7af07 to a6a436d Compare August 23, 2026 18:59
@rustbot rustbot added the O-windows Operating system: Windows label Aug 23, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@clarfonthey

Copy link
Copy Markdown
Contributor

So, looking at this, I'm going to nominate this for discussion alongside the clippy lints PR: #161328

Since they should go together, I think.

@rustbot label:I-libs-nominated

@rustbot rustbot added the I-libs-nominated Nominated for discussion during a libs team meeting. label Aug 23, 2026
@pacak

pacak commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

Sure.

Please no more obscure platform failures, please no more obscure platform failures, please no more obscure platform failures, please no more obscure platform failures...

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) label Aug 23, 2026
Comment thread library/std/src/sys/pal/windows/c/windows_sys.rs
@pacak
pacak force-pushed the unreachable-pub branch 2 times, most recently from 69a1881 to 21fd14f Compare August 23, 2026 21:41
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 13, 2026
Rollup of 5 pull requests

Successful merges:

 - #162732 (Fix unsound dealloc of reborrows from custom allocators)
 - #154113 (std::net: clamp multicast ttl value to u8 max.)
 - #161178 (lint ineffective #[unstable] annotations on re-exports)
 - #161612 (std: make a lot of items crate private)
 - #162717 (prevent ICE from `derive` on `repr(packed)` enum)
@jhpratt

jhpratt commented Sep 14, 2026

Copy link
Copy Markdown
Member

Looks like there are two things: one case was missed and the lint was left enabled in some spot (despite the PR description).

#162737 (comment)

@bors r-

@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 Sep 14, 2026
@rust-bors

rust-bors Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

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

View changes since this unapproval

@rustbot

rustbot commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Most of them don't need to be public, but there are scenarios where
thing is private on one platform but public on the other, so having a
lint on all the time gets complicated.

Added #![warn(unreachable_pub)] in library/std/src/lib.rs
Added #[allow(unreachable_pub)] on top of std::os and std::sys specifically.
@pacak

pacak commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Updated the description, reduced visibility in two missing cases in library/std/src/process/tests.rs.

@clarfonthey

Copy link
Copy Markdown
Contributor

@bors retry

@rust-bors

rust-bors Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

❗ You can only retry pull requests that are approved and have a previously failed auto build.

Hint: If you wanted to retry pull request CI instead, push the latest commit again, or close and then reopen this PR.

@clarfonthey

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors

rust-bors Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 0f916bb has been approved by clarfonthey

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 14, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Sep 15, 2026
std: make a lot of items crate private

1. Added `#![warn(unreachable_pub)]` in `library/std/src/lib.rs`
2. Added `#[allow(unreachable_pub)]` on top of `std::os` and `std::sys` specifically.

r? clarfonthey
rust-bors Bot pushed a commit that referenced this pull request Sep 15, 2026
Rollup of 7 pull requests

Successful merges:

 - #160911 (Remove d32 feature from 32-bit Arm targets)
 - #162771 (Filter do_not_recommend impls before handling a single candidate)
 - #162779 (rustdoc: Revert "fix bare urls split text")
 - #161612 (std: make a lot of items crate private)
 - #162372 (Clean up `test/rustdoc-html` folder by moving tests where appropriate)
 - #162643 (Fix `path_trailing_sep` methods for Windows verbatim paths)
 - #162784 (AGENTS.md: Permit local experimentation, per the online policy.)
jhpratt added a commit to jhpratt/rust that referenced this pull request Sep 15, 2026
std: make a lot of items crate private

1. Added `#![warn(unreachable_pub)]` in `library/std/src/lib.rs`
2. Added `#[allow(unreachable_pub)]` on top of `std::os` and `std::sys` specifically.

r? clarfonthey
rust-bors Bot pushed a commit that referenced this pull request Sep 15, 2026
Rollup of 10 pull requests

Successful merges:

 - #160911 (Remove d32 feature from 32-bit Arm targets)
 - #162771 (Filter do_not_recommend impls before handling a single candidate)
 - #162779 (rustdoc: Revert "fix bare urls split text")
 - #161548 (hir_typeck: Don't ICE on closures without drop location in closure capture lint)
 - #161612 (std: make a lot of items crate private)
 - #162204 (Suggest keyword order for `extern "C" const unsafe fn`)
 - #162372 (Clean up `test/rustdoc-html` folder by moving tests where appropriate)
 - #162638 (dont suggest changing the mutability of a borrow that comes from a macro)
 - #162643 (Fix `path_trailing_sep` methods for Windows verbatim paths)
 - #162784 (AGENTS.md: Permit local experimentation, per the online policy.)
rust-bors Bot pushed a commit that referenced this pull request Sep 15, 2026
Rollup of 10 pull requests

Successful merges:

 - #160911 (Remove d32 feature from 32-bit Arm targets)
 - #162771 (Filter do_not_recommend impls before handling a single candidate)
 - #162779 (rustdoc: Revert "fix bare urls split text")
 - #161548 (hir_typeck: Don't ICE on closures without drop location in closure capture lint)
 - #161612 (std: make a lot of items crate private)
 - #162204 (Suggest keyword order for `extern "C" const unsafe fn`)
 - #162372 (Clean up `test/rustdoc-html` folder by moving tests where appropriate)
 - #162638 (dont suggest changing the mutability of a borrow that comes from a macro)
 - #162643 (Fix `path_trailing_sep` methods for Windows verbatim paths)
 - #162784 (AGENTS.md: Permit local experimentation, per the online policy.)
rust-bors Bot pushed a commit that referenced this pull request Sep 15, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #160911 (Remove d32 feature from 32-bit Arm targets)
 - #161868 (libtest: never iterate over all tests in `--exact` mode)
 - #162771 (Filter do_not_recommend impls before handling a single candidate)
 - #162779 (rustdoc: Revert "fix bare urls split text")
 - #161548 (hir_typeck: Don't ICE on closures without drop location in closure capture lint)
 - #161612 (std: make a lot of items crate private)
 - #162204 (Suggest keyword order for `extern "C" const unsafe fn`)
 - #162372 (Clean up `test/rustdoc-html` folder by moving tests where appropriate)
 - #162638 (dont suggest changing the mutability of a borrow that comes from a macro)
 - #162643 (Fix `path_trailing_sep` methods for Windows verbatim paths)
 - #162654 (Improve Armv7-R documentation)
 - #162784 (AGENTS.md: Permit local experimentation, per the online policy.)
@rust-bors
rust-bors Bot merged commit 4ccc843 into rust-lang:main Sep 15, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 15, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 15, 2026
Rollup merge of #161612 - pacak:unreachable-pub, r=clarfonthey

std: make a lot of items crate private

1. Added `#![warn(unreachable_pub)]` in `library/std/src/lib.rs`
2. Added `#[allow(unreachable_pub)]` on top of `std::os` and `std::sys` specifically.

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

Labels

O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) O-unix Operating system: Unix-like 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.

7 participants