Skip to content

privacy: Fix type privacy holes in RPITITs#152543

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
petrochenkov:rprivtit2
Mar 23, 2026
Merged

privacy: Fix type privacy holes in RPITITs#152543
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
petrochenkov:rprivtit2

Conversation

@petrochenkov
Copy link
Copy Markdown
Contributor

@petrochenkov petrochenkov commented Feb 12, 2026

View all comments

A subset of #146470.

Private types in RPITITs now report hard errors.
Private types in bounds of associated types still only report the private_bounds lint due to unacceptable amount of breakage (#146470 (comment)).

Closes #144139

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 12, 2026
@petrochenkov
Copy link
Copy Markdown
Contributor Author

@bors try

rust-bors Bot pushed a commit that referenced this pull request Feb 12, 2026
privacy: Fix type privacy holes when it doesn't cause too much breakage
@rust-bors

This comment has been minimized.

@petrochenkov
Copy link
Copy Markdown
Contributor Author

TODO: @craterbot check p=1 crates=https://crater-reports.s3.amazonaws.com/pr-146470-3/retry-regressed-list.txt

@petrochenkov petrochenkov marked this pull request as ready for review February 12, 2026 15:38
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 12, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 12, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Feb 12, 2026

r? @fmease

rustbot has assigned @fmease.
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: compiler
  • compiler expanded to 68 candidates
  • Random selection from 16 candidates

@petrochenkov petrochenkov added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 12, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Feb 12, 2026

☀️ Try build successful (CI)
Build commit: fcfb0ff (fcfb0ffc7ed7fc631df1136063939ef648434735, parent: 7ad4e69ad585d8ff214f7b42d01f1959eda08f40)

@petrochenkov
Copy link
Copy Markdown
Contributor Author

@craterbot
Copy link
Copy Markdown
Collaborator

👌 Experiment pr-152543 created and queued.
🤖 Automatically detected try build fcfb0ff
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Copy Markdown
Collaborator

🚧 Experiment pr-152543 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@traviscross traviscross added the I-lang-radar Items that are on lang's radar and will need eventual work or consideration. label Feb 12, 2026
@craterbot
Copy link
Copy Markdown
Collaborator

🎉 Experiment pr-152543 is completed!
📊 27 regressed and 0 fixed (5514 total)
📊 267 spurious results on the retry-regressed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-152543/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Feb 12, 2026
@petrochenkov petrochenkov 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-review Status: Awaiting review from the assignee but also interested parties. labels Feb 13, 2026
@petrochenkov
Copy link
Copy Markdown
Contributor Author

Crater results are basically the same as #146470 without the second commit (see e.g. #146470 (comment)).

@petrochenkov
Copy link
Copy Markdown
Contributor Author

Previous FCP - #146470 (comment).

@petrochenkov petrochenkov added T-lang Relevant to the language team and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 13, 2026
@rust-rfcbot rust-rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Mar 21, 2026
@rust-rfcbot
Copy link
Copy Markdown
Collaborator

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

@fmease fmease added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-t-lang Status: Awaiting decision from T-lang labels Mar 22, 2026
@fmease fmease changed the title privacy: Fix type privacy holes when it doesn't cause too much breakage privacy: Fix type privacy holes in RPITITs Mar 22, 2026
Copy link
Copy Markdown
Member

@fmease fmease left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR leads to quite a few breakages but it seems too tricky and arduous to send downstream patches, unfortunately. @bors r+

View changes since this review

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Mar 22, 2026

📌 Commit ef8c95c has been approved by fmease

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 Mar 22, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
privacy: Fix type privacy holes in RPITITs

A subset of rust-lang#146470.

Private types in RPITITs now report hard errors.
Private types in bounds of associated types still only report the `private_bounds` lint due to unacceptable amount of breakage (rust-lang#146470 (comment)).

Closes rust-lang#144139
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
privacy: Fix type privacy holes in RPITITs

A subset of rust-lang#146470.

Private types in RPITITs now report hard errors.
Private types in bounds of associated types still only report the `private_bounds` lint due to unacceptable amount of breakage (rust-lang#146470 (comment)).

Closes rust-lang#144139
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
privacy: Fix type privacy holes in RPITITs

A subset of rust-lang#146470.

Private types in RPITITs now report hard errors.
Private types in bounds of associated types still only report the `private_bounds` lint due to unacceptable amount of breakage (rust-lang#146470 (comment)).

Closes rust-lang#144139
rust-bors Bot pushed a commit that referenced this pull request Mar 23, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #122668 (Add APIs for dealing with titlecase)
 - #152543 (privacy: Fix type privacy holes in RPITITs)
 - #153107 (Optimize BTreeMap::append() using CursorMut)
 - #153312 (Packages as namespaces part 1)
 - #153534 (Remove a flaky `got_timeout` assert from two channel tests)
 - #153718 (Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined .)
 - #153857 (Rename `target.abi` to `target.cfg_abi` and enum-ify llvm_abiname)
 - #153880 (Lifted intersperse and intersperse_with Fused transformation and updated documentation + tests)
 - #153931 (remove usages of to-be-deprecated numeric constants)
 - #150630 (Unknown -> Unsupported compression algorithm)
 - #153491 (Move `freeze_*` methods to `OpenOptionsExt2`)
 - #153582 (Simplify find_attr! for HirId usage)
 - #153623 (std: move `sys::pal::os` to `sys::paths`)
 - #153647 (docs(fs): Clarify That File::lock Coordinates Across Processes)
 - #153936 (Skip stack_start_aligned for immediate-abort)
 - #154011 (implement `BinaryHeap::as_mut_slice`)
 - #154167 (ui/lto: move and rename two tests from issues/)
 - #154174 (allow `incomplete_features` in most UI tests)
 - #154175 (Add new alias for Guillaume Gomez email address)
 - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl)
 - #154188 (Update the tracking issue for #[diagnostic::on_move])
 - #154201 (Use enums to clarify `DepNodeColorMap` color marking )
rust-bors Bot pushed a commit that referenced this pull request Mar 23, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #122668 (Add APIs for dealing with titlecase)
 - #152543 (privacy: Fix type privacy holes in RPITITs)
 - #153107 (Optimize BTreeMap::append() using CursorMut)
 - #153312 (Packages as namespaces part 1)
 - #153534 (Remove a flaky `got_timeout` assert from two channel tests)
 - #153718 (Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined .)
 - #153857 (Rename `target.abi` to `target.cfg_abi` and enum-ify llvm_abiname)
 - #153880 (Lifted intersperse and intersperse_with Fused transformation and updated documentation + tests)
 - #153931 (remove usages of to-be-deprecated numeric constants)
 - #150630 (Unknown -> Unsupported compression algorithm)
 - #153491 (Move `freeze_*` methods to `OpenOptionsExt2`)
 - #153582 (Simplify find_attr! for HirId usage)
 - #153623 (std: move `sys::pal::os` to `sys::paths`)
 - #153647 (docs(fs): Clarify That File::lock Coordinates Across Processes)
 - #153936 (Skip stack_start_aligned for immediate-abort)
 - #154011 (implement `BinaryHeap::as_mut_slice`)
 - #154167 (ui/lto: move and rename two tests from issues/)
 - #154174 (allow `incomplete_features` in most UI tests)
 - #154175 (Add new alias for Guillaume Gomez email address)
 - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl)
 - #154188 (Update the tracking issue for #[diagnostic::on_move])
 - #154201 (Use enums to clarify `DepNodeColorMap` color marking )
rust-bors Bot pushed a commit that referenced this pull request Mar 23, 2026
…uwer

Rollup of 21 pull requests

Successful merges:

 - #152543 (privacy: Fix type privacy holes in RPITITs)
 - #153107 (Optimize BTreeMap::append() using CursorMut)
 - #153312 (Packages as namespaces part 1)
 - #153534 (Remove a flaky `got_timeout` assert from two channel tests)
 - #153718 (Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined .)
 - #153857 (Rename `target.abi` to `target.cfg_abi` and enum-ify llvm_abiname)
 - #153880 (Lifted intersperse and intersperse_with Fused transformation and updated documentation + tests)
 - #153931 (remove usages of to-be-deprecated numeric constants)
 - #150630 (Unknown -> Unsupported compression algorithm)
 - #153491 (Move `freeze_*` methods to `OpenOptionsExt2`)
 - #153582 (Simplify find_attr! for HirId usage)
 - #153623 (std: move `sys::pal::os` to `sys::paths`)
 - #153647 (docs(fs): Clarify That File::lock Coordinates Across Processes)
 - #153936 (Skip stack_start_aligned for immediate-abort)
 - #154011 (implement `BinaryHeap::as_mut_slice`)
 - #154167 (ui/lto: move and rename two tests from issues/)
 - #154174 (allow `incomplete_features` in most UI tests)
 - #154175 (Add new alias for Guillaume Gomez email address)
 - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl)
 - #154188 (Update the tracking issue for #[diagnostic::on_move])
 - #154201 (Use enums to clarify `DepNodeColorMap` color marking )
@rust-bors rust-bors Bot merged commit b20e49f into rust-lang:main Mar 23, 2026
12 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 23, 2026
github-actions Bot pushed a commit to rust-lang/stdarch that referenced this pull request Mar 26, 2026
…uwer

Rollup of 21 pull requests

Successful merges:

 - rust-lang/rust#152543 (privacy: Fix type privacy holes in RPITITs)
 - rust-lang/rust#153107 (Optimize BTreeMap::append() using CursorMut)
 - rust-lang/rust#153312 (Packages as namespaces part 1)
 - rust-lang/rust#153534 (Remove a flaky `got_timeout` assert from two channel tests)
 - rust-lang/rust#153718 (Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined .)
 - rust-lang/rust#153857 (Rename `target.abi` to `target.cfg_abi` and enum-ify llvm_abiname)
 - rust-lang/rust#153880 (Lifted intersperse and intersperse_with Fused transformation and updated documentation + tests)
 - rust-lang/rust#153931 (remove usages of to-be-deprecated numeric constants)
 - rust-lang/rust#150630 (Unknown -> Unsupported compression algorithm)
 - rust-lang/rust#153491 (Move `freeze_*` methods to `OpenOptionsExt2`)
 - rust-lang/rust#153582 (Simplify find_attr! for HirId usage)
 - rust-lang/rust#153623 (std: move `sys::pal::os` to `sys::paths`)
 - rust-lang/rust#153647 (docs(fs): Clarify That File::lock Coordinates Across Processes)
 - rust-lang/rust#153936 (Skip stack_start_aligned for immediate-abort)
 - rust-lang/rust#154011 (implement `BinaryHeap::as_mut_slice`)
 - rust-lang/rust#154167 (ui/lto: move and rename two tests from issues/)
 - rust-lang/rust#154174 (allow `incomplete_features` in most UI tests)
 - rust-lang/rust#154175 (Add new alias for Guillaume Gomez email address)
 - rust-lang/rust#154182 (diagnostics: avoid ICE for undeclared generic parameter in impl)
 - rust-lang/rust#154188 (Update the tracking issue for #[diagnostic::on_move])
 - rust-lang/rust#154201 (Use enums to clarify `DepNodeColorMap` color marking )
@traviscross
Copy link
Copy Markdown
Contributor

The Reference doesn't, I think, document enough here to have needed an update.

cc @rust-lang/lang-docs @rust-lang/fls

@traviscross traviscross added the waived-reference-pr This language change does not need a Reference PR. label May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. I-lang-radar Items that are on lang's radar and will need eventual work or consideration. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team to-announce Announce this issue on triage meeting waived-reference-pr This language change does not need a Reference PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(re-)Fix private-in-public for RPITIT

10 participants