Skip to content
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

docs: inline std::ffi::c_str types to std::ffi #134791

Merged
merged 2 commits into from
Dec 27, 2024

Conversation

notriddle
Copy link
Contributor

Rustdoc has no way to show that an item is stable, but only at a different path. std::ffi::c_str::NulError is not stable, but std::ffi::NulError is.

To avoid marking these types as unstable when someone just wants to follow a link from CString, inline them into their stable paths.

Fixes #134702

r? @tgross35

Rustdoc has no way to show that an item is stable,
but only at a different path. `std::ffi::c_str::NulError` is
not stable, but `std::ffi::NulError` is.

To avoid marking these types as unstable when someone just
wants to follow a link from `CString`, inline them into their
stable paths.
@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 Dec 26, 2024
@notriddle notriddle added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Dec 26, 2024
@notriddle
Copy link
Contributor Author

Nominating for beta because the risk is low and the docs are very misleading in their current form.

@tgross35
Copy link
Contributor

Thanks for fixing this.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 26, 2024

📌 Commit 40b0026 has been approved by tgross35

It is now in the queue for this repository.

@bors bors 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 Dec 26, 2024
@lukas-code
Copy link
Member

Shouldn't the re-exports in core and alloc be inlined as well?

@tgross35
Copy link
Contributor

Shouldn't the re-exports in core and alloc be inlined as well?

Good point, may as well get them done at the same time.

@bors r-

@bors bors 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 Dec 26, 2024
@notriddle
Copy link
Contributor Author

@bors r=tgross35

@bors
Copy link
Contributor

bors commented Dec 27, 2024

📌 Commit fc8a541 has been approved by tgross35

It is now in the queue for this repository.

@bors bors 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 Dec 27, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 27, 2024
Rollup of 8 pull requests

Successful merges:

 - rust-lang#131522 ([macro_metavar_expr_concat] Fix rust-lang#128346)
 - rust-lang#134379 (Add `into_array` conversion destructors for `Box`, `Rc`, and `Arc`.)
 - rust-lang#134644 (Document collection `From` and `FromIterator` impls that drop duplicate keys.)
 - rust-lang#134649 (Fix forgetting to save statx availability on success)
 - rust-lang#134728 (Use scoped threads in `std::sync::Barrier` examples)
 - rust-lang#134782 (Update Code Example for `Iterator::rposition`)
 - rust-lang#134789 (unwinding: bump version to fix naked_asm on Xous)
 - rust-lang#134791 (docs: inline `std::ffi::c_str` types to `std::ffi`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c1447e3 into rust-lang:master Dec 27, 2024
6 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 27, 2024
Rollup merge of rust-lang#134791 - notriddle:notriddle/inline-ffi-error-types, r=tgross35

docs: inline `std::ffi::c_str` types to `std::ffi`

Rustdoc has no way to show that an item is stable, but only at a different path. `std::ffi::c_str::NulError` is not stable, but `std::ffi::NulError` is.

To avoid marking these types as unstable when someone just wants to follow a link from `CString`, inline them into their stable paths.

Fixes rust-lang#134702

r? `@tgross35`
@rustbot rustbot added this to the 1.85.0 milestone Dec 27, 2024
@notriddle notriddle deleted the notriddle/inline-ffi-error-types branch December 27, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-nominated Nominated for backporting to the compiler in the beta channel. 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.

Rustdoc regression: stable items reexported from unstable modules appear unstable
5 participants